| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |\
| | |
| | | |
PERF: Optimize array check for bounded 0,1 values
|
| | |
| | |
| | |
| | | |
Optimize frequent check for probabilities when they are doubles
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change Generator.*: -> random.Generator.*:
Partial fix for #13114
|
| |\ \
| | | |
| | | | |
DOC: random: Fix a comment and example in the multivariate_normal docstring
|
| | | | |
|
| | | | |
|
| | |\ \ |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The covariance matrix is the identity, so the standard deviation of
each component is 1.0.
|
| |\ \ \ \
| | | | | |
| | | | | | |
STY: Use PEP 585 and 604 syntaxes throughout the .pyi stub files
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | |_|/
| | |/| | |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove python api calls from check_constraint
xref #20636
|
| | | | |
|
| | |/
| |/|
| | |
| | | |
Return a default value when passed an empty array
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Guard against empty pvals
closes #20483
* MAINT: Correct exception type
Raise TypeError for enhanced backward compat when pvals
is scalar
|
| | | |
|
| |\ \
| | | |
| | | | |
MAINT: import setuptools before distutils in one `np.random` test
|
| | |/ |
|
| |/
| |
| |
| |
| |
| |
| | |
`load_module` is deprecated since python 3.4 and will be removed in python 3.12.
Use `exec_module` instead. Provide a convenience function in `distutils.misc_utils`
instead of `npy_load_module` from `compat.py3k`.
|
| |
| |
| |
| |
| |
| | |
One of the code examples in the docstring of
`numpy.random.Generator.multivariate_normal()` was not being displayed
properly in the built documentation.
|
| |
| |
| |
| | |
xref github issue #15201
|
| |\
| | |
| | | |
BUG: Get full precision for 32 bit floating point random values.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The formula to convert a 32 bit random integer to a random float32,
(next_uint32(bitgen_state) >> 9) * (1.0f / 8388608.0f)
shifts by one bit too many, resulting in uniform float32 samples always
having a 0 in the least significant bit. The formula is corrected to
(next_uint32(bitgen_state) >> 8) * (1.0f / 16777216.0f)
Occurrences of the incorrect formula in numpy/random/tests/test_direct.py
were also corrected.
Closes gh-17478.
|
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was a mistake in the code that generated
the plot in the zipf docstring. The Riemann
zeta function is `scipy.special.zeta`, not
`scipy.special.zetac`.
I also tweaked the sample parameters and the plot
code so the plot is a bit more informative.
|
| |
| |
| | |
Current documentation for random.power and random.Generator.power states that ValueError is raised if a < 1; however the power function distribution only supports strictly positive a > 0 and raises ValueError if a <= 0. Fixed documentation to reflect this.
|
| |
| |
| |
| |
| |
| |
| | |
Add note to the description of the \"high\" parameter to indicate that it is possible
for the value to be included in the returned values due to floating point precision, despite
the fact that it represents an open interval.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
| |
| |
| | |
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At the moment, we are guessing whether we have the MSVC compiler, by
looking at what Python was originally compiled for. That works only if
we are using the same compiler, but this is not the case when we compile
with e.g. mingw-w64 using Python.org Python.
Unfortunately, at the time we are specifying build flags, we don't know
what compiler we are using.
Allow build flags to clib to be callables that return lists of strings,
instead of strings, where the callables can do work like inspecting the
compiler, at build time.
Use this to check for MSVC at build time, when specifying the
`/GL-` flag.
See gh-9977 for a related discussion about these flags.
|
| |\
| | |
| | | |
MAINT: Remove unused imports and remove duplicated tests
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| | |
Correct incorrect implemetation of carry in PCG64 and PCG64DXSM
when advancing more than 2**64 steps
closes #20048
|
| |
| |
| | |
* Fix typos
|
| |
| |
| |
| |
| |
| |
| | |
Replace pattern of casting PyArray_DATA to size_t then char
in favor of direct use of PyArray_BYTES
closes #19941
|
| | |
|
| | |
|
| |\
| | |
| | | |
MAINT: Minor include rationalizations.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Replace "Python.h" by <Python.h>
- Replace "structmember.h" by <structmember.h>
- Replace <npy_config> by "npy_config"
- Define PY_SSIZE_T_CLEAN before all Python.h includes in .c files.
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As of Py3, np.compat.unicode == str, but that's not entirely obvious
(it could correspond to some numpy dtype too), so just use plain str.
Likewise for np.compat.int.
tests are intentionally left unchanged, as they can be considered as
implicitly testing the np.compat.py3k interface as well.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* add support for windows on arm targets
* Philox: Use _umulh intrinsic for ARM64 target
* CPU Detection: Refactor to avoid separate pre-processor definition for WoA
* adapt test_dragon4 to avoid using pow (**) to workaround issue in windows C RT for arm64
* Update numpy/core/include/numpy/npy_cpu.h
Co-authored-by: Matti Picus <matti.picus@gmail.com>
* add release note for numpy windows/arm64 support
* Update 19513.new_feature.rst
Co-authored-by: Matti Picus <matti.picus@gmail.com>
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
| |
| |
| |
| |
| | |
This makes the test reproducible. See comments on failing test
in #19540.
|
| |\
| | |
| | | |
ENH: Add annotations for `__path__` and `PytestTester`
|