| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| | |
| | | |
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
|
|\ \ \
| | | |
| | | | |
DEP: Deprecate as_strided returning a writable array as default
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
DOC: Updated minor typos in function_base.py and test_function_base.py
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
nanpercentile was conforming to dimension convention of percentile incorrectly.
percentile outputs results for the different percentiles along the first
dimension of the output. nanpercentile was moving the reduction axis to the
front using swapaxes, which would move the first axis out of place if there
were more than two in the array. Added a test with more than two axes to
demonstrate and used rollaxis instead of swapaxes to do the interhange.
|
| | | |
|