[Nexus] Release of NeXpy v0.10.10 and nexusformat v0.4.17

Rolf Krahl rolf.krahl at helmholtz-berlin.de
Tue Jan 30 16:38:57 GMT 2018


Am Dienstag, 30. Januar 2018, 10:22:08 schrieb Pete Jemian:
> We should document this trick in the NeXus manual in the h5py section. 
> 
> On 1/30/2018 10:12 AM, V. Armando Solé wrote:
> > 
> > I applied the trick you gave me:
> > 
> >      if sys.version.startswith("2"):
> >          string_dtype = h5py.special_dtype(vlen=unicode)
> >      else:
> >          string_dtype = h5py.special_dtype(vlen=str)
> >      group.attrs["auxiliary_signals"] = numpy.array(auxiliary_signals,
> > dtype=string_dtype)

if you document it, I'd suggest to write the test as:

if sys.version_info < (3,):
    ...

It will still work for Python 21.7 in the future.

Best regards,
Rolf

-- 
Rolf Krahl <rolf.krahl at helmholtz-berlin.de>
Helmholtz-Zentrum Berlin für Materialien und Energie (HZB)
Albert-Einstein-Str. 15, 12489 Berlin
Tel.: +49 30 8062 12122
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5897 bytes
Desc: not available
URL: <http://lists.nexusformat.org/pipermail/nexus/attachments/20180130/8809b82a/attachment-0001.p7s>


More information about the NeXus mailing list