StringDType is interesting. I was just looking for confirmation on a few things I have tried. 1. you can't use the StringDType in structured arrays. 2. you can't save or savetxt arrays with this dtype
For example, something as simple as this in either scenario produces errors >>> vals = ['a little string', 'small one', '', None] >>> dt1 = StringDType(na_object=None) >>> z = np.array(vals, dtype=dt1) array(['a little string', 'small one', '', None], dtype=StringDType(na_object=None)) >>>z0 = np.asarray(vals) # -- as expected, an object array) array(['a little string', 'small one', '', None], dtype=object) >>> z1 = np.asarray(vals, dtype=[("fld", dt1)]) # -- using the dtype from above ...snip ... errored out with... TypeError: StringDType is not currently supported for structured dtype fields. Yes there are other packages one could use, but in those two use cases, I was wondering the roadmap is for this dtype, (if any) _______________________________________________ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe send an email to numpy-discussion-le...@python.org https://mail.python.org/mailman3/lists/numpy-discussion.python.org/ Member address: arch...@mail-archive.com