You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An object that can be passed as an argument to the numpy.dtype() constructor to create the array’s dtype.
which can potentially be anything, including a python object, or list comprehension syntax, if I understand correctly. Potentially, this may contain the } character, breaking the parsing of the top-level dictionary.
However, the alphabetical ordering of the top-level dictionary guarantees that this key is always first, so I guess that if we parse the header backwards, we can still read shape and fortran_order properly...
The parser of the newest version of libnpy was completely rewritten to be clearer and more robust. The new parser now only requires the 3 keywords 'descr', 'fortran_order', and 'shape' to be unique.
In the
npy
file format, thedescr
key containsAn object that can be passed as an argument to the numpy.dtype() constructor to create the array’s dtype.
which can potentially be anything, including a python object, or list comprehension syntax, if I understand correctly. Potentially, this may contain the
}
character, breaking the parsing of the top-level dictionary.However, the alphabetical ordering of the top-level dictionary guarantees that this key is always first, so I guess that if we parse the header backwards, we can still read
shape
andfortran_order
properly...cc @wolfv @llohse
The text was updated successfully, but these errors were encountered: