| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #16539
The implicit 0-padding that is done to small entropy inputs to make them the
size of the internal pool conflicts with the spawn keys, which start with an
appended 0.
In order to maintain stream compatibility with unspawned `SeedSequence`s, we
explicitly 0-pad short inputs out to the pool size only if the spawn key is
provided, and thus would trigger the bug. This should minimize the impact on
users that were not encountering the bug.
|
|
|
| |
* fix np.ma.core.doc_note
|
|\
| |
| | |
ENH: add type stubs from numpy-stubs
|
| | |
|
| | |
|
| |
| |
| |
| | |
It currently splits on ":", which causes problems with drives.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add the type stubs and tests from numpy-stubs. Things this entails:
- Copy over the stubs (numpy/__init__.pyi and
numpy/core/_internal.pyi)
- The only modification made was removing `ndarray.tostring` since
it is deprecated
- Update some setup.py files to include pyi files
- Move the tests from numpy-stubs/tests into numpy/tests
- Skip them if mypy is not installed (planning on setting up CI in a
future PR)
- Add a mypy.ini; use it to configure mypy in the tests
- It tells mypy where to find NumPy in the test env
- It ignores internal NumPy type errors (since we only want to
consider errors from the tests cases)
- Some small edits were made to fix test cases that were emitting
deprecation warnings
- Add numpy/py.typed so that the types are picked up in an
installed version of NumPy
|
|\ \
| | |
| | | |
BUG: fixes einsum output order with optimization (#14615)
|
| | | |
|
|\ \ \
| | | |
| | | | |
DOC: Correct MV Normal sig
|
| | |/
| |/|
| | |
| | | |
Add new kw arg to sig
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously misspelling were allowed by these functions as long as e.g. the first
letter matched. They will now check whether the match is exact giving a deprecation
warning when it is not.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|\ \ \
| | | |
| | | | |
DOC: Minor rounding correction in Generator.binomial
|
| |/ /
| | |
| | | |
Changed 38.88 from 38 to 39
|
| | |
| | |
| | | |
* when parsing auxv fail, try parsing /proc/cpuinfo
|
| | |
| | |
| | |
| | |
| | | |
Fix for #16508. Cython wants every pointer declaration to be on a
separate line.
|
|\ \ \
| | | |
| | | | |
BUG:random: Error when ``size`` is smaller than broadcast input shapes.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
Broadcastable size with inputs does not produce an error when size produces
a smaller output array than the broadcast input shape. Patch checks that
the output shape matches the outer shape of the broadcast fo all inputs and
the size when given.
|
|\ \ \
| | | |
| | | | |
MAINT: f2py: move thread-local declaration definition to common macro
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Move compiler thread-local declaration detection to a common macro.
Also support C11 thread_local declaration, if available.
|
|\ \ \ \
| |/ / /
|/| | | |
MAINT:ARMHF Fix detecting feature groups NEON_HALF and NEON_VFPV4
|
| | | | |
|
| | | | |
|
|/ / / |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
DOC: Point Contributing page to new NEP 45
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Per #16500 discussion, adds link updates to PR.
Replaces NEP URLs with intersphinx links in these
files:
* doc/HOWTO_RELEASE.rst.txt
* doc/source/dev/howto-docs.rst
* numpy/doc/dispatch.py
* numpy/lib/format.py
and incorporates @rossbar's #16502 change of `config.py`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
* DOC: Fixes for 18 broken links
This, with PR #16465, should fix nearly all the remaining broken links
on the site. 4 or 5 others should be easy to fix and just
need attention from someone more knowledgeable -- will
open an issue. For release notes with dead links,
I could usually find links on archive.org for roughly contemporary
versions.
* DOC: Update to "Fixes for 18 broken links #16472"
* Obsolete links, previously commented out, now deleted:
https://github.com/numpy/numpy/pull/16472#discussion_r433928958
* Semantic markup for reference to Python class:
https://github.com/numpy/numpy/pull/16472#discussion_r433553928
* Missing :ref: in internal link:
https://github.com/numpy/numpy/pull/16472#discussion_r433554484
Not included: Resolution on using external/internal doc link in .py:
https://github.com/numpy/numpy/pull/16472#discussion_r433554824
* DOC: Add internal link for 'Fixes for 18 broken links' PR #16472
Making reference [1] an internal link in function_base.py => numpy.vectorize.html
* DOC: Redirect 2 link fixes in PR #16472
* governance.rst link reverted
* ununcs.rst `overridden` link goes where it was meant to
per https://github.com/numpy/numpy/pull/16472#pullrequestreview-424666070
|
| |/ /
|/| |
| | |
| | |
| | |
| | | |
This is the spelling of the compatibility macro that CPython is
recommending.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|\ \ \
| | | |
| | | | |
BUG,MAINT: Fix issues with non-reduce broadcasting axes
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was previously checked for, but during the refactor using
NPY_ITER_REDUCTION_AXIS to allocate the result in the iterator
instead of manually was lost here.
Einsum has a similar issue, but this is not modified here.
|
| | | |
| | | |
| | | |
| | | | |
Incorporate suggestions by Marten and Eric.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The new reduce axis marker for nditer/NpyIter allows to move the
allocation logic necessary to allocate the reduction result
to the nditer, thus simplifying the logic here.
This leads to some other related cleanups of the result
initialization.
The subok flag was removed, since it was always set to 0
and the iterator rejects subclasses.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Mark the core dimensions as reduce axis. This allows them to be
freely broadcast (basically ignored for most practical purposes)
while other axes are normally broadcast even though the operand is
read-only or write-only.
If we were to use read-write operands with `REDUCE_OK` these
additional dimensions are currently simply absored as reduction
dimensions...
(I hope this is understandable, please see the issues/test
for an example...)
Fixes gh-15139, replaces gh-15142
Co-Authored-By: Marten van Kerkwijk <mhvk@astro.utoronto.ca>
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
A reduction axis can be a broadcast axis (-1), which does not
exist. Or an existing axis which then must have a length of 1, or
will be allocated with a length of 1.
This allows the correct allocation of reduction outputs with
axes of size 1 (instead of only newaxis/-1), i.e. it allows
supporting the result output with `keepdims=True` in reductions.
It can also be used by generalized ufuncs to specific that one
operand does not need to iterate a core dimensions. In the case
of generalized ufuncs, this is handled like a reduce dimensions,
but that dimension is later removed. This means that the operand
can be specified without read-write.
It mainly is necessary to allow normal broadcasting for the axes
_not_ marked as reduce axis.
In most cases however, an operand should never use broadcasting
when marking axes as reduction.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The stride calculation and axis check redid some of the work
finding the number of dimensions again. This simplifies the logic
and clarifies an error message a bit.
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
BUG: fix GCC 10 major version comparison
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The comparison of GCC major version used a string
comparison, which is known to break when comparing
single vs. double version numbers. This fix
compares the integer of the major GCC version.
Before this fix, GCC/Gfortran 10 would get inappropriate
flag "-mno-cygwin" applied, which was removed in GCC 4
and makes GCC error out.
|
|\ \ \ \
| | | | |
| | | | | |
ENH: Improved `__str__` for polynomials
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add a fallback for TypeErrors that are raised when attempting
to compare arbitrary elements (e.g. strings or Python complex)
to 0 in _generate_str.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Changes the printing style of instances of the convenience classes in
the polynomial package to a more "human-readable" format.
__str__ has been modified and __format__ added to ABCPolyBase, modifying
the string representation of polynomial instances, e.g. when printed.
__repr__ and the _repr_latex method (which is used in the Jupyter
environment are unchanged.
Two print formats have been added: 'unicode' and 'ascii'. 'unicode' is
the default mode on *nix systems, and uses unicode values for numeric
subscripts and superscripts in the polynomial expression. The 'ascii'
format is the default on Windows (due to font considerations) and uses
Python-style syntax to represent powers, e.g. x**2. The default
printing style can be controlled at the package-level with the
set_default_printstyle function.
The ABCPolyBase.__str__ has also been made to respect the linewidth
printoption. Other parameters from the printoptions dictionary are not
used.
Co-Authored-By: Warren Weckesser <warren.weckesser@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|\ \ \ \ \
| | | | | |
| | | | | | |
ENH: Hardcode buffer handling for simple scalars
|