pandas
pandas copied to clipboard
DataMatrix constructor ignores dtype argument if data is a DataMatrix
>>> a = DataMatrix([[1.0,2.0,3.0],[4.0,5.0,6.0]], range(2), range(3))
>>> b = DataMatrix(a, dtype=int)
>>> b.values.dtype
dtype('float64')
Not sure if this was a design decision or not, but it seems like the dtype of b.values should be int.
This is a bug. DataMatrix as input to the DataMatrix constructor was added only very recently and I overlooked the case you gave.
I've noticed a similar issue when using the dictionary constructor.
should be fixed in git HEAD