| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Call to ndindex() with no arguments results in a ValueError exception, whereas before commit ca27396b, a call with no arguments was allowed.
Issue is due to unneeded check for shape tuple size.
|
|\
| |
| | |
TST: Add tests for constants.
|
| |
| |
| |
| |
| | |
Test the values of np.pi, np.e, and np.euler_gamma to make sure
they are correct to relative tolerance 1e-15.
|
|\ \
| | |
| | | |
BUG: Fix CheckStrides and strides setter checks for available memory
|
| | |
| | |
| | |
| | | |
Adding const and removing old comment.
|
| | |
| | |
| | |
| | |
| | | |
Also adds a test to check offset calculation is correct when
setting strides for a base array with negative strides.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changes the logic of PyArray_CheckStrides to really check the
full extent the new array will have. It also changes the stride
setting to calculate the full real extent of the underlying array
without assuming (usually correctly) that the strides of the base
array are regular.
Add some tests for cases that previously failed.
This "closes Issue gh-2503"
|
|\ \ \
| | | |
| | | | |
Fix headers
|
| | | |
| | | |
| | | |
| | | | |
There was a chance that they could conflict with user defined macros.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The npy_config.h file used SIZEOF_DOUBLE and SIZEOF_LONG_DOUBLE, neither
of which was defined in the included config.h file. That was fixed by
including numpyconfig.h. Doing so made the code dealing with Apple type
sizes redundant as it is already present in numpyconfig.h, so it was
removed.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Some of these are probably new unprefixed macros, but adding them
makes for a bit more safety. The unprefixed macros will be deprecated
at some point, so this probably has no side effects.
|
| | | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | | |
The sources don't define NPY_NO_PREFIX and consequently none of the
unprefixed macros are defined. Using them can lead to some unexpected
results.
|
|\ \ \
| | | |
| | | | |
BUG: Fix byteswapping for complex scalars
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
During a cleanup, the fast paths were invalidated because SIZEOF_LONGDOUBLE
was not defined anymore and needs to be replaced with NPY_SIZEOF_LONGDOUBLE.
The other SIZEOF macros still existed however so only complex long double
broke because it switched to the already broken fast path.
This commit fixes the fast path, and replaces all SIZEOF_ macros within
arraytypes.c.src with their corresponding NPY_SIZEOF_ macros.
|
| | |
| | |
| | | |
Commit acf7421128b9d974d5153759650b7aaee3c2efec introduced a change in the handling of the `size` argument but the docstring wasn't updated accordingly. This commit fixes the issue.
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| | |
The int64 data type allows numbers from -9223372036854775808 to
9223372036854775807. The minus sign was missing.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At least, I hope it's spurious. Certainly it's creating a spurious
error message, is unexpected by callers (one of whom specifically
makes the *opposite* check before calling get_cast_transfer_function),
and even if it is a useful check for some reason I can't see, it
certainly doesn't belong in this function (which is otherwise just
taking care of byte-swapping and alignment issues and doesn't know
anything about dtypes). And worst case, we'll have turned an exception
into a crash; even if I'm wrong, this shouldn't cause any code to go
from working to not working, just from broken to slightly-more-broken.
Test and original diagnosis by @cgohlke.
Fixes gh-2798.
|
| |
| |
| |
| | |
Multiline comments should begin with a blank line. This patch fixes it.
|
| |
| |
| |
| |
| |
| |
| | |
After understanding the issues with datetime (see gh-568), I have documented my
understanding as comments in the code, so that the next time there are problems
with datetime on some platform, one can quickly figure out what is going on
from the code + comments.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, two (critical) parts of the code used `time_t` instead of
`NPY_TIME_T`. Due to the fact, that most of the time `NPY_TIME_T` was equal to
`time_t`, this bug didn't show up. But in mingw, `NPY_TIME_T` is actually equal
to `__time64_t` and then this causes 64 bit integers to be cast into 32 bit
integers (thus becoming negative), which causes localtime() to fail in mingw.
Fixes gh-568.
|
| |
| |
| |
| | |
Add check to see if 12 bytes is a valid size for a long double
|
| | |
|
| |
| |
| |
| |
| | |
- Refactor unit tests for invalid dtypes so that each test is on a separate line. This will make it easier to figure out which typestring is failing the unit test.
- Add Py_DECREF for temp variable
|
| | |
|
| | |
|
| |
| |
| |
| | |
Revert to pre numpy 1.7 behavior where invalid typestring size was ignored and isplay deprecate warning. This warning should eventually be changed to an error in future numpy versions.
|
|\ \
| | |
| | | |
BUG: Fix regression for in1d with non-array input
|
| | |
| | |
| | |
| | |
| | |
| | | |
The behavior of in1d is not really defined here, but it should
be at least consistent over different execution branches. This is
what it has been for most usages.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There was a regression introduced by the speed improvement in
commit 6441c2a. This fixes it, and generally ravels the arrays for
np.in1d. However it can be argued that at least the first array should
not be ravelled in the future.
Fixes "Issue gh-2755"
|
|\ \ \
| | | |
| | | | |
MapIter API 1d iteration fix and tests
|
| |\ \ \ |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix unicode tests for flexible string representation on Python 3.3
|
| | |_|_|/
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
fix a spelling error
|