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
currently the numpy.dtype.flags bitmasks are exposed in numpy._core.multiarray
the flag numpy._core.multiarray.LIST_PICKLE is used by distributed to determine how best to pickle an ndarray so it would be great if there were a public namespace to access these flags, eg numpy.dtypes.LIST_PICKLE
The text was updated successfully, but these errors were encountered:
We had discussed that a bit on slack. A neat way would also be to make the flags return an enum.IntFlags. The class of which might fit into np.dtypes (better repr and reduces the spam in the module)
Another way to solve this without exposing the flags in python would be to add a member hanging off the dtype object that indicates if it's supposed to be pickled for serialization (that internally would do the check against the flags).
It is pretty niche, but the property hanging off the dtype object is also pretty easy to implement - just add a new function that does the flag check and add an entry for it in the arraydescr_getsets array in numpy/_core/src/multiarray/descriptor.c.
Exposing all the flags to python would also work, and I guess we already expose the flags too so exposing the whole enum probably makes sense, just wanted to comment that the property is also not very hard to add.
Yes, a proprety is fine, I would like to not spoil the properties too much with things users will never really need, but overall it is not a big issue.
Uh oh!
There was an error while loading. Please reload this page.
Proposed new feature or change:
currently the numpy.dtype.flags bitmasks are exposed in numpy._core.multiarray
the flag numpy._core.multiarray.LIST_PICKLE is used by distributed to determine how best to pickle an ndarray so it would be great if there were a public namespace to access these flags, eg
numpy.dtypes.LIST_PICKLE
The text was updated successfully, but these errors were encountered: