| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit modifies the numpy.apply_along_axis() function so that if
it is called with an ndarray subclass, the internal func1d calls
receive subclass instances and the overall function returns an instance
of the subclass. There are two new tests for these two behaviours.
|
|/ / /
| | |
| | |
| | |
| | | |
Formerly, I got DeprecationWarnings about callable being None when I tested
on Python 3.
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
Simplify the expansion of the pad_width argument by using `broadcast_to()`.
This fixes the problem reported in gh-7808, where, for example,
`pad_width=((1, 2),)` resulted in an error.
Closes gh-7808.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
In some places, just remove aparently unnecessary filters.
After this, all cases of ignore filters should be removed from
the tests, making testing (even multiple runs) normally fully
predictable.
|
| |
| |
| |
| |
| |
| | |
Comment mentions a speedup, but it seems unsure why it should
be there. Instead use an error state in divide_by_count.
Some extra complex warnings had to be ignored (but those seemed correct)
|
|\ \
| | |
| | | |
ENH: improve duck typing inside iscomplexobj
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Both `iscomplexobj` and `isrealobj` now try to refer to the argument's
`dtype` attribute if it exists. This significantly extends the list of
types for which `iscomplexobj` returns correct results (including e.g.
scipy sparse matrices and pandas objects).
Extended the tests of the `iscomplexobj` routine for the following cases:
* simple scalars
* standard lists (test internal auto-conversion to numpy arrays)
* "Duck typing" for objects that define a dtype attribute (either
referring to one of the existing numpy dtypes, or a custom dtype, as
pandas does)
This fixes #7924
|
|/ / |
|
|\ \
| | |
| | | |
ENH Generalized rot90
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Also a slight refactoring of np.polyfit.
|
|\ \ \
| | | |
| | | | |
BUG: change real output checking to test if all imaginary parts are zero
|
| | | |
| | | |
| | | |
| | | | |
also fixed some PEP8 issues
|
| | | |
| | | |
| | | |
| | | | |
Change to a deterministic test instead of using rand
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Pathlib was only added to the stdlib in Python 3.4, and there it
can handle string type input for a file with UTF8 encoding.
But the Patlib version on PyPi that can be installed for Python 2.7
doesn't accept strings, gives errors like:
======================================================================
ERROR: test_ndfromtxt (test_io.TestPathUsage)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/rgommers/Code/numpy/numpy/testing/decorators.py", line 147, in skipper_func
return f(*args, **kwargs)
File "/home/rgommers/Code/numpy/numpy/lib/tests/test_io.py", line 1888, in test_ndfromtxt
f.write('1 2\n3 4')
TypeError: must be unicode, not str
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
lib.interp function now allows interpolation of complex fp with
complex128 precision (i.e. equivalent to lib.interp on the real and
imaginary parts). Tests are added for the non-periodic and periodic
cases.
|
|\ \ \ \
| | | | |
| | | | | |
BUG: distance arg of np.gradient must be scalar, fix docstring
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixups to docstring, and disallow non-scalars as the distance args to
np.gradient.
Fixes #7548, fixes #6847
|
|/ / / /
| | | |
| | | |
| | | |
| | | | |
Prevents overflow errors for large arrays on systems
where the default int type is int32.
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
ENH: adds np.nancumsum and np.nancumprod
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This PR adds an implementation of `nancumsum` and `nancumprod`.
The actual function is a two-liner adapted from `nansum`.
Its structure is adapted from PR: https://github.com/numpy/numpy/pull/5418/
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
TST: Add test for #6469
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Removed superfluous `ceil` call in automated bin width estimator.
Updated tests to reflect modified estimator.
|
| |/ / / /
|/| | | |
| | | | |
| | | | |
| | | | | |
Fixes #7411. Tests and documentation updated.
Fixes other small issues with range and bin count computations.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes bug in string copying in np.place
in which replacements strings that were
smaller than their replaced elements
would only partially replace the element
instead of the entire element.
Closes gh-6974.
Addendum: this commit also appears to have
fixed issue with overflow for very large
input arrays.
Closes gh-7207.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Tweak corrcoef
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This doesn't actually test much, as we don't have any inputs where that
was not already the case. But at least it is there and perhaps a fuzz
test can be added at a later date.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | / /
| | |_|/ /
| |/| | | |
Generalized flip
|
| |/ / / |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
TST: fix #6542, add tests to check non-iterable argument raises in hstack and related functions.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
...to hstack, vstack, stack,
hsplit, vsplit, dsplit, dstack
that check that they raise exceptions.
|
|/ / / / |
|
|/ / /
| | |
| | |
| | | |
This test exposes padding bug described in the issue #7353
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since shuffle only works along the first dimension, it must be done before
reshape to get reasonable looking data. Did not affect the current tests. I
noticed while working on some scipy code.
Also, made a couple of doc changes to np.random.shuffle.
|
| | |
| | |
| | |
| | | |
Closes gh-7113.
|
| | |
| | |
| | |
| | | |
Closes gh-7269.
|
| | |
| | |
| | |
| | | |
number of bins and associated tests
|