jazzband / jsonmodels

jsonmodels is library to make it easier for you to deal with structures that are converted to, or read from JSON.
http://jsonmodels.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
334 stars 51 forks source link

List of primitives #88

Open raviv opened 6 years ago

raviv commented 6 years ago

Hi, How do I define a field that is a list of floats? Also, is it possible to defined a field that is a list of list of floats (e.g. float matrix) Thanks.

avrahamshukron commented 6 years ago

List of floats:

class MyModel(models.Base):
    list_of_floats = fields.ListField(float)

Not sure about float matrix.