↧
Answer by hpaulj for Dictionary of numpy array in python
If I define a simple class like: class MyObj(object): pass .I could create a dictionary with several of these objects:In [819]: d={1:MyObj(), 2:MyObj()}and then assign attributes to each objectIn...
View ArticleDictionary of numpy array in python
I want to create a data structure of empty numpy array something of this sort:d[1].foo = numpy.arange(x)d[1].bar = numpy.arange(x)d[2].foo = numpy.arange(x)d[2].bar = numpy.arange(x)What would be the...
View Article