| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Computing the type of a dhash can be slow for complex (e.g. structured)
dtypes. Hashing dtypes can be useful in some applications, such as
when doing type-based dispatching, and speed can be critical in those
cases. This enhancement caches the once-computed hash value in the
dtype structure, so as to save time on further lookups. The cached
value is invalidated in the rare cases where the dtype is mutated.
Benchmarks numbers:
python3.4 -m timeit -s "import numpy as np; t=np.dtype('uint64')" "hash(t)"
* before patch: 1000000 loops, best of 3: 0.498 usec per loop
* after patch: 10000000 loops, best of 3: 0.0616 usec per loop
python3.4 -m timeit -s "import numpy as np; t=np.dtype([(s, 'f') for s in 'abcdefghij'])" "hash(t)"
* before patch: 100000 loops, best of 3: 4.43 usec per loop
* after patch: 10000000 loops, best of 3: 0.0603 usec per loop
Closes #5339.
|
|
|
|
|
|
|
|
|
|
| |
Modified the docstrings to all, any, sum, prod, mean, var, std, min, max
to add keepdims argument.
Added 'out' keyword parameter to numpy.argmin, numpy.argmax, to mirror
ndarray methods.
Updated ndarray.clip docstring to give correct parameter description.
|
|\
| |
| | |
BUG: deprecation for ignored corrcoef args
|
| |
| |
| |
| |
| |
| |
| | |
The bias and ddof arguments had no effect on the calculation of the
correlation coefficient because the value cancels in the calculation.
Deprecate these arguments to np.corrcoef and np.ma.corrcoef.
|
|/
|
|
|
|
| |
Closes gh-5684.
[ci skip]
|
|\
| |
| | |
MRG: new clear_catch_warnings context manager
|
| |
| |
| |
| | |
Add release note on `clear_and_catch_warnings`.
|
| | |
|
|/
|
|
|
|
|
| |
Raises a TypeError if any of the keyword arguments supplied to a
ufunc does not exactly match the name in the signature. Prior to
this, trailing characters were discarded, e.g. 'out2' would be
treated as if it where 'out'.
|
| |
|
| |
|
| |
|
|\
| |
| | |
ENH: ufuncs can take a tuple of arrays as 'out' kwarg
|
| |
| |
| |
| | |
Closes #4752
|
|\ \
| | |
| | | |
DOC: added version information for slogdet
|
| |/
| |
| |
| |
| |
| | |
Version information added in the Notes section of the functions
accepting stacked arrays and in the discussion of this feature
in the linalg overview.
|
|/
|
|
|
|
|
|
|
| |
Fix StringConverter to avoid OverflowError in genfromtxt. Before, int(2**66) would work
(and return a ‘long’) but then np.array([2**66], dtype=np.integer) would not work and
return an OverflowError which would propagate to genfromtxt. This commit fixes this by
ensuring testing in advance whether an OverflowError will occur. In addition, this adds
an explicit np.int64 entry on systems where integer means int32. Values larger than
2**63-1 will be cast as float. This includes a regression test and adds an entry to the
release notes.
|
|
|
|
|
|
|
|
| |
Per the mailing list discussion [1], I have implemented a new function
`broadcast_to` that broadcasts an array to a given shape according to
numpy's broadcasting rules.
[1] http://mail.scipy.org/pipermail/numpy-discussion/2014-December/071796.html
|
| |
|
|\
| |
| | |
DOC: Add documentation for Yields section in docstrings.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
BUG: Simplified fix, Overflow in tan and tanh for large complex values.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Document the increased use of the system library for C99 complex
functions and the addition of improved fallback functions for
* npy_ctan,
* npy_cacos, npy_casin, npy_catan
* npy_ccosh, npy_csinh, npy_ctanh,
* npy_cacosh, npy_casinh, npy_catanh
|
|\ \ \
| | | |
| | | | |
genfromtxt example in user docs missing delimiter
|
| | | |
| | | |
| | | | |
The example given in the user docs does not run correctly without adding `delimiter=","`. This add the missing keyword to allow the examples to be run.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
SWIG interface has moved to tools/ directory, so updating the doc to state that
and also the number of tests is reduced since what reported, so a generic "more
than" is used (to avoid similar situations in the future) but likely also the
other numbers should be checked.
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
BUG: Fix recarray getattr and getindex return types
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit makes changes to `__getitem__` and `__getattr__` of recarrays:
1. recarrays no longer convert string ndarrays to chararrays, and
instead simply return ndarrays of string type.
2. attribute access and index access of fields now behaves identically
3. dtype.type is now inherited when fields of structured type are accessed
Demonstration:
>>> rec = np.rec.array([('abc ', (1,1), 1), ('abc', (2,3), 1)],
... dtype=[('foo', 'S4'), ('bar', [('A', int), ('B', int)]), ('baz', int)])
Old Behavior:
>>> type(rec.foo), type(rec['foo'])
(numpy.core.defchararray.chararray, numpy.recarray)
>>> type(rec.bar), type(rec['bar']), rec.bar.dtype.type
(numpy.recarray, numpy.recarray, numpy.void)
>>> type(rec.baz), type(rec['baz'])
(numpy.ndarray, numpy.ndarray)
New behavior:
>>> type(rec.foo), type(rec['foo'])
(numpy.ndarray, numpy.ndarray)
>>> type(rec.bar), type(rec['bar']), rec.bar.dtype.type
(numpy.recarray, numpy.recarray, numpy.record)
>>> type(rec.baz), type(rec['baz'])
(numpy.ndarray, numpy.ndarray)
|
|\ \ \
| |/ /
|/| | |
DOC: add documentation for some scalar checks
|
| | |
| | |
| | |
| | | |
DOC: Mention that PyArray_Return steals a reference to arr
|
|\ \ \
| | | |
| | | | |
DOC: update build instructions, add developer docs
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Addresses review comments on gh-5473.
[ci skip]
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | | |
- add section on basic and parallel builds
- update links and remove outdated info
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This update adds a section better describing record arrays in the user
guide (numpy/doc/structured_arrays.py).
It also corrects nomenclature, such that "structured array" refers to
ndarrays with structured dtype, "record array" refers to modified
ndarrays as created by np.rec.array, and "recarray" refers to ndarrays
viewed as np.recarray. See the note at the end of the structured
array user guide.
|
|/ / /
| | |
| | |
| | |
| | | |
swapaxes now returns a view of the input array when the axes to swap
are both the same, not the input array as it used to do. Fixes #5260
|
| | |
| | |
| | |
| | |
| | | |
Previous to this commit, rollaxis returned a view unless the order of
the axis was unchanged, in which case the input array was returned.
|
| | |
| | |
| | |
| | | |
[ci skip]
|
|\ \ \
| |_|/
|/| | |
ENH: Improve arg handling & enhance test suite for `np.pad`
|
| | | |
|
|\ \ \
| | | |
| | | | |
DOC: Reorganization request for Development Workflow docs
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The "Basic Workflow" section of the Development Workflow page was reorganized
to make it clearer to new users and remove/update old material.
Major changes:
- Moved the core developer notes. Core dev notes are confusing in basic usage
information. Updated a couple of the commands
- Added more commands and reorgaized the "New Feature Branch" section. Took
some text from "Rebasing" and moved it here, because it was redundant.
- Made many changes to the "Editing Workflow" to clarify commands. Moved some
git push stuff into this section as well.
- Moved pull request section to just after editing workflow. Removed outdated
images and simplified the text. Make code review requirements explicit.
- Moved rebasing and troubleshooting sections to the end. Could add more here
later.
- Links renamed and broken link removed.
|