| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
Both `ndarray` and `nditer` spell this property `ndim`, so broadcast
objects should too. The existing property remains for compatibility
|
|
|
|
|
| |
Attempt to clarify the sometimes convoluted behavior of the various
order options 'K', 'A', 'C', 'F'.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
ndarray.fill (not fill) is not appropriate here because it is a list how
to create arrays not how to fill them. [ci skip]
|
|
|
|
| |
Fixes gh-7010
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the documentation for newbyteorder, copy and pasted in several
spots, had paragraphs ending in `::`, initiating a sphinx generated
Verbatim environment and resulting in "LaTeX Error: Too deeply nested".
The user_array.container class needed non-empty class documentation.
That that caused a problem is probably a numpydoc bug, but it is easy to
fix.
[skip ci]
|
|
|
|
| |
Closes gh-6863.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug traces to the PyArray_OrderConverter
method in conversion_utils.c, where no errors
are thrown if the ORDER parameter passed in
is not of the string data-type or has a string
value of length greater than one. This commit
causes a DeprecationWarning to be raised, which
will later be turned into a TypeError or another
type of error in a future release.
Closes gh-6598.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Behavior goes back at least to 1.6.2.
Fixes #6367.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of these fixes involve putting blank lines around
.. versionadded:: x.x.x
and
.. deprecated:: x.x.x
Some of the examples were also fixed.
|
| |
|
|
|
|
|
|
|
| |
Update docs for boolean array indexing and nonzero order.
Add links to row-major and column-major terms where they appear.
Closes #3177
|
|
|
|
|
| |
Document the matmul function and add '@' to the operator
section of the reference manual.
|
|
|
|
| |
Closes #5927
|
|\
| |
| | |
ENH: add np.stack
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The motivation here is to present a uniform and N-dimensional interface for
joining arrays along a new axis, similarly to how `concatenate` provides a
uniform and N-dimensional interface for joining arrays along an existing axis.
Background
~~~~~~~~~~
Currently, users can choose between `hstack`, `vstack`, `column_stack` and
`dstack`, but none of these functions handle N-dimensional input. In my
opinion, it's also difficult to keep track of the differences between these
methods and to predict how they will handle input with different
dimensions.
In the past, my preferred approach has been to either construct the result
array explicitly and use indexing for assignment, to or use `np.array` to
stack along the first dimension and then use `transpose` (or a similar method)
to reorder dimensions if necessary. This is pretty awkward.
I brought this proposal up a few weeks on the numpy-discussion list:
http://mail.scipy.org/pipermail/numpy-discussion/2015-February/072199.html
I also received positive feedback on Twitter:
https://twitter.com/shoyer/status/565937244599377920
Implementation notes
~~~~~~~~~~~~~~~~~~~~
The one line summaries for `concatenate` and `stack` have been (re)written to
mirror each other, and to make clear that the distinction between these functions
is whether they join over an existing or new axis.
In general, I've tweaked the documentation and docstrings with an eye toward
pointing users to `concatenate`/`stack`/`split` as a fundamental set of basic
array manipulation routines, and away from
`array_split`/`{h,v,d}split`/`{h,v,d,column_}stack`
I put this implementation in `numpy.core.shape_base` alongside `hstack`/`vstack`,
but it appears that there is also a `numpy.lib.shape_base` module that contains
another larger set of functions, including `dstack`. I'm not really sure where
this belongs (or if it even matters).
Finally, it might be a good idea to write a masked array version of `stack`.
But I don't use masked arrays, so I'm not well motivated to do that.
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Array docstring now lists correct order default
|
| |
| |
| |
| | |
Fixes #5306
|
| | |
|
|\ \
| | |
| | | |
merge _compiled_base module into multiarray
|
| | |
| | |
| | |
| | | |
Allows access to internal functions for the file.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
the corresponding docstring.
Also added an example showing how to write to the diagonal of an array.
|
| |
|
| |
|
| |
|
|\
| |
| | |
DOC: remove preservena reference from docstrings
|
| |
| |
| |
| |
| |
| |
| | |
preservena is not not implemented.
the putmask docstring is misleading, currently copyto is faster for
dense or sparse masks while putmask is faster for random masks.
[ci skip]
|
| |
| |
| |
| |
| | |
Also move docstrings into the versions in numpy/core/numeric.py as
the functions are no longer in the defunct _dotblas module.
|
| | |
|
|/
|
|
| |
The function returns bytes not strings. This is relevant in python3.
|
|
|
|
| |
"one of 'biufcSUV'" is not very helpful if it stands alone,
also the 'O' typecode was missing.
|
|
|
|
| |
the default algorithm is introselect
|
|
|
|
|
|
|
|
|
| |
The documentation needs to be in umathmodule.c as that is where ldexp
and frexp and defined. I moved the current documention from
add_newdocs.py to ufunc_docstrings.py, manually translated them into C
strings, and inserted them into umathmodule.c.
Closes #2354.
|
|
|
|
|
|
| |
- promote_types does not return correct string size for integer and string arguments. Fix so that integer and string types are promoted to string type that is long enough to hold integer type safely cast to string.
- can_cast incorrectly returns True for certain integer and string types. Fix so that can_cast only returns True if string type is long enough to hold integer type safely cast to string.
- calling astype to convert integer to string should fail if string type is not long enough to hold integer converted to string and casting argument is set to "safe".
|
|
|
|
|
|
|
| |
tostring returns bytes which are not equal to string, so provide a
tobytes function alias.
tostring does not emit a deprecation warning yet so rdepends do not need
to check two names to support older versions of numpy without warnings.
|
|
|
|
| |
reduceat does not allow out-of-bounds indices currently
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a case where 'ik,kj->ij' works, einsum would raise an error for
'ik,k...->i...' because the 'ik' did not have ellipsis
In einsum.c.src prepare_op_axes() pass all 'broadcast' cases through the
'RIGHT' case (interation from the end).
Since the BROADCAST variable is not longer needed, all instances of it have
been removed from einsum.c.src
test_einsum.py - adds a test_einsum_broadcast case.
|
|
|
| |
This matches the format of related functions like `empty_like` and `zeros`.
|