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

Already on GitHub? Sign in to your account

scipy.sparse.[hv]stack don't respect anymore the dtype parameter #3111

Closed
nouiz opened this Issue Dec 3, 2013 · 1 comment

Comments

Projects
None yet
1 participant

nouiz commented Dec 3, 2013

Hi,

As reported on the mailing list[1], scipy.sparse.[hv]stack do not respect the dtype parameter anymore.

@pv told that it was probably the new fast path added in master recently for those function that cause this.

Here is code that replicate this:

import scipy.sparse
from scipy.sparse import csr_matrix
import numpy as np
x = np.arange(5*5).reshape(5,5)
y = csr_matrix(x)
res = scipy.sparse.vstack([y,y], dtype='float32')
assert res.dtype == "float32"

[1] http://mail.scipy.org/pipermail/scipy-user/2013-December/035197.html

perimosocordiae added a commit to perimosocordiae/scipy that referenced this issue Dec 4, 2013

TST: adding failing tests for #3111
It is indeed the fast-path change that broke dtype behavior.

perimosocordiae added a commit to perimosocordiae/scipy that referenced this issue Dec 4, 2013

@pv pv closed this in ccde60f Dec 4, 2013

nouiz commented Dec 4, 2013

thanks for the quick fix!

andrenarchy added a commit to andrenarchy/scipy that referenced this issue Dec 4, 2013

TST: adding failing tests for #3111
It is indeed the fast-path change that broke dtype behavior.

andrenarchy added a commit to andrenarchy/scipy that referenced this issue Dec 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment