Closed pnorbert closed 6 years ago
Can we have f.var['varname'].attr return the attributes that belong to that variable? The C API has that now by adios_inq_var(). For example:
f=ad.file('re.bp'); f AdiosFile (path='re.bp', nvars=5, vars=['demo/Pressure', 'gndy', 'gndx', 'dT', 'T'], nattrs=1, attrs=['T/unit'], current_step=0, last_step=9, file_size=28935979) a=f.attr['T/unit'] a AdiosAttr (name='T/unit', dtype=dtype('S1'), value=array('C', dtype='|S1')) a.value 'C' v=f.var['T'] v AdiosVar (varid=2, name='T', dtype=dtype('float64'), ndim=2, dims=(300L, 400L), nsteps=10)
It would be nice to have something like v.attrs a=v.attr['unit'] functions
Oh Blimey, this is already supported.
v.attrs['unit'].value 'C'
Can we have f.var['varname'].attr return the attributes that belong to that variable? The C API has that now by adios_inq_var(). For example:
It would be nice to have something like v.attrs a=v.attr['unit'] functions