I'd like to make a class extending the numpy array base type,
class LemmaMatrix(numpy.ndarray):
@classmethod
def init_from_corpus(cls, ...): cls(numpy.empty(...))
But apparently, it will not allow multi-dimensional array types. Is there a way around this? Thanks in advance!
ndarray(empty([3, 3]))
TypeError: only length-1 arrays can be converted to Python scalars