| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
See issue gh-15297 and related mailing list discussion.
This PR bring scalar.__round__() in line with python, so that `round(scalar)` always returns a python integer, while `round(scalar, ndigits=0)` returns the same type. Since complex numbers are not supported in Python, and cannot be reasonably cast to integers they are deprecated.
Closes gh-15297
|
|
|
|
|
| |
resize typemap issue
python 3 bytes vs str issue
|
|
|
|
|
|
|
|
|
|
| |
This commit removes lines 127-130 as they are duplicates of 149-152.
These lines correspond to the files:
* numpy/core/src/common/npy_binsearch.h
* numpy/core/src/common/npy_partition.h
* numpy/core/src/common/npy_sort.h
* numpy/core/src/common/templ_common.h
|
| |
|
|
|
|
|
|
| |
skip doctests that require scipy
move original mtrand module to _mtrand
adjust documentation for namespace change
|
|
|
|
|
|
|
| |
remove files that were part of the origal repo
rework randomgen docs to integrate with numpy and fix some links
remove convenience functions, require explicit call to gen.brng
move code out of numpy.random.randomgen into numpy.random
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
first cut at building randomgen
upgrade 'cythonize' and fix absolute imports to relative
define NPY_NO_DEPRECATED_API and fix other warnings
enable pgc64 by always using PCG_EMULATED_MATH
refactor so import randomgen works
add TODO comments for pcg64 improvements
fix imports, module name in setup.py; remove _testing
make cythonize non-recursive, restore examples to proper place
update to randomgen 7bca296c0b9
replace mtrand with LegacyGenerator, tweak for compatibility
port f879ef4 to fix GH10839
minimized difference between generator.pyx and _legacy.pyx
fix namespace in doctests, mark results that are random
update to randomgen commit 95c8cdd1c
Incorporate testing of edge cases into main tests
Rename test files to describe their purpose
Import import locations to reflect numpy paths
Correct tolerance on float32 tests
Remove set_printoptions
Remove complex normal
Remove future imports
Pull in BasicRNG source changes from original author
Small doc fixes
_mtrand => _rand
Improve consistency of nan handling
Prevent nans prducing values from int functions
add randomgen documentation to the tree
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This file is typically created and used by the file manager Dolphin
from KDE.
|
| |
|
|
|
|
| |
[ci skip] [skip ci]
|
| |
|
|\
| |
| | |
ENH: Add pytest support
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code Overview:
Numpy currently decouples the math function definitions in `npy_math.c.src`
from the function declarations found in `npy_math.h`. This patch allows
definitions to be included along with the inclusion of the `npy_math.h`
header.
Keeping the declarations and definitions separate is usually the right
approach, but mathematical code like this might be better off as an
exception to this common practice. Because the definitions are in the source
file instead of the header, the compiler does not have any clue what lies
underneath these math functions. This means the compiler can't make
important optimizations like inlining and vectorization. Extensions that
utilize these functions could greatly benefit from this, specifically
`loops.c.src` from the umath extension.
Implementation Details:
+ Renames `npy_math.c.src` to `npy_math_internal.h.src`
+ Generates `npy_math_internal.h` from template by adding to
`npymath_sources` list and adding `npymath` directory to include paths in
`generate_numpyconfig_h` function of `numpy/core/setup.py`
+ Numpy's core distutils defines `#NPY_INTERNAL_BUILD` macro to make sure
`npy_math_internal.h` is not included when other modules try to include
public header `npy_math.h`
- Currently do not know how to ship headers generated from template
files
+ Adds `npy_math.c`, a file that includes the `npy_math_internal.h.src`
file (but does not add NPY_INLINE static)
- This is to keep the same static npy_math library as it exists now
+ Appends `numpy/npy_math.h` with `npy_math_internal.h` under condition that
it's not being included in npy_math.c.src
- The conditional macros mean `loops.c.src` will have definitions
included, and the compiler will vectorize accordingly
+ Adds `NPY_INLINE` static to function declarations and definitions when
necessary
+ Replaces `sqrtf` with `npy_sqrtf` in `numpy/core/src/umath/umath_tests.c`
to make function portable
- `_sqrtf` was not found on certain Windows environments compiling with
Py2
|
|
|
|
|
|
|
|
|
|
|
| |
Copy tempita from https://github.com/gjhiggins/tempita with a few
changes to remove the six dependency. This removes a dependency on
Cython's tempita, which is not to be relied on as it is considered by
the Cython folks to be an implementation detail. The package is named
npy_tempita so that it can always be distinguished from an installed
tempita.
The cythonize.py script is changed to use the vendorized tempita.
|
| |
|
|
|
|
|
| |
Also ignore setup.cfg: this file is created/modified by the
alias/setopt/saveopts commands, and therefore needs to be in .gitignore.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Commit 494abcf1 (ENH: speed-up minimum, maximum and xor for bool dtype)
reworked numpy/core/src/umath/loops.h to be autogenerated at build time,
but forgot to update .gitignore.
Fix it, so that the now-autogenerated loops.h do not constantly show as
untracked in git status output.
|
|
|
|
| |
ignore cscope and gnu global files
|
|
|
|
|
|
|
| |
Instead generate at build time. The generated sources are still part of
the sdist.
tools/cythonize.py is copied from SciPy with small changes to the
configuration.
|
| |
|
|
|
|
|
| |
It should only ignore the one in the root directory. The fix is to
prepend a '/' to the directory name.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Tox is a handy little tool to make it easier than not to run proper
tests that exercise the build system and are run against multiple
Python versions: http://pypi.python.org/pypi/tox
See comment at the top of tox.ini for hints.
|
|
|
|
| |
http://help.github.com/ignore-files/
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|