dataclass-wizard icon indicating copy to clipboard operation
dataclass-wizard copied to clipboard

Numpy ndarray compatibility

Open Citingmarc opened this issue 3 years ago • 1 comments

  • Dataclass Wizard version: 0.22.1
  • Python version: Python 3.10.4
  • Operating System: Pop!_OS 22.04 LTS

Description

Creating a dataclass that has a numpy array field is not supported. Could this be added? Or maybe a generic way to include something into the data class to act as a hanlder for saving/loading.

Citingmarc avatar Oct 21 '22 13:10 Citingmarc

Hi @Citingmarc ! Thanks for creating this issue.

Yes, I would be interested in supporting custom types such as numpy.ndarray.

A generic way to do it could also be useful to others, as this kind of issue does come up every now and again. It would be nice to also have it for documentation purposes.

Let me know if you're able to contribute towards this feature. I can provide help/mentorship on it if needed. Else, I will look into this when time allows. Thanks!

rnag avatar Nov 24 '24 04:11 rnag