Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
nouiz opened this Issue · 1 comment

1 participant

@nouiz

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 perimosocordiae referenced this issue from a commit in perimosocordiae/scipy
@perimosocordiae perimosocordiae TST: adding failing tests for #3111
It is indeed the fast-path change that broke dtype behavior.
6061218
@perimosocordiae perimosocordiae referenced this issue from a commit in perimosocordiae/scipy
@perimosocordiae perimosocordiae BUG: fixing issue #3111 d0628e6
@pv pv closed this in ccde60f
@nouiz

thanks for the quick fix!

@andrenarchy andrenarchy referenced this issue from a commit in andrenarchy/scipy
@perimosocordiae perimosocordiae TST: adding failing tests for #3111
It is indeed the fast-path change that broke dtype behavior.
b395c77
@andrenarchy andrenarchy referenced this issue from a commit in andrenarchy/scipy
@perimosocordiae perimosocordiae BUG: fixing issue #3111 b21037e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.