Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataMatrix constructor ignores dtype argument if data is a DataMatrix #7

Closed
andylei opened this issue Sep 29, 2010 · 3 comments
Closed

Comments

@andylei
Copy link

andylei commented Sep 29, 2010

>>> 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.

@wesm
Copy link
Member

wesm commented Sep 30, 2010

This is a bug. DataMatrix as input to the DataMatrix constructor was added only very recently and I overlooked the case you gave.

@hector13
Copy link

hector13 commented Oct 3, 2010

I've noticed a similar issue when using the dictionary constructor.

@wesm
Copy link
Member

wesm commented Dec 11, 2010

should be fixed in git HEAD

jbrockmendel pushed a commit to jbrockmendel/pandas that referenced this issue Dec 28, 2018
dan-nadler pushed a commit to dan-nadler/pandas that referenced this issue Sep 23, 2019
dan-nadler pushed a commit to dan-nadler/pandas that referenced this issue Sep 23, 2019
dimastbk pushed a commit to dimastbk/pandas that referenced this issue Aug 2, 2023
added xfail to tests, small fixes
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants