ENH: Use int shape #2995

Merged
merged 2 commits into from Oct 19, 2013

Conversation

Projects
None yet
4 participants
Member

larsoner commented Oct 15, 2013

This suppresses numpy warnings.

Owner

pv commented Oct 15, 2013

Maybe better use newshape = [1]*x.ndim

In [2]: %timeit np.ones(5, dtype=int)
1000000 loops, best of 3: 1.75 us per loop
In [3]: %timeit [1]*5
10000000 loops, best of 3: 152 ns per loop

Not that it matters a lot, but it's weird to use an array for the shape tuple.

Member

larsoner commented Oct 15, 2013

Fine by me @pv... might as well speed up while fixing a minor bug. Latest commit adds this.

Coverage Status

Coverage remained the same when pulling 1f449dd on Eric89GXL:signaltools-int-fix into 7479249 on scipy:master.

Coverage Status

Coverage remained the same when pulling 1f449dd on Eric89GXL:signaltools-int-fix into 7479249 on scipy:master.

rgommers added a commit that referenced this pull request Oct 19, 2013

@rgommers rgommers merged commit 7dd9e12 into scipy:master Oct 19, 2013

1 check passed

default The Travis CI build passed
Details
Owner

rgommers commented Oct 19, 2013

Thanks @eric89gxl, merged.

@larsoner larsoner deleted the larsoner:signaltools-int-fix branch Mar 11, 2014

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