| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
Generally, this involves using list comprehension, or explicit list
construction as `filter` is an iterator in Python 3.
|
|\ \
| | |
| | | |
2to3: Fix callable.
|
| |/ |
|
|\ \
| | |
| | | |
2to3: Apply `funcattrs` fixer. Closes #3058.
|
| |/
| |
| |
| |
| | |
This replaces the `b.func_xxxx` with newer `__xxxx__` attribute names
For example, `f.__name__` replaces `f.func_name`
|
|/
|
|
| |
This changes the `exec` command to the `exec` function.
|
|
|
|
| |
Example: except ValueError,msg: -> except ValueError as msg:
|
|
|
|
|
|
|
| |
These references were in MANIFEST.in, doc/summarize.py, release.sh, and
numpy/testing/noseclasses.py and involved scons files that have been
removed, mostly setupscons.py and setupsconsegg.py that were in the top
level.
|
|
|
|
|
|
|
|
|
| |
This removes files and code supporting scons builds. After this change
numpy will only support builds using distutils or bento. The removal of
scons has been discussed on the list several times and a decision has been
made that scons support is no longer needed. This was originally discussed
for numpy 1.7 and because the distutils and bento methods are still
available we are skipping the usual deprecation period.
|
|
|
|
| |
There a resetwarnings() call, so need to add back these filters.
|
|
|
|
|
|
|
| |
1) New function assert_no_warnings
2) Make assert_warns and assert_no_warnings pass through the
function's return value on success, so that it can be checked as
well.
|
|\
| |
| | |
[FIX] Make np.random.shuffle less brain-dead
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The logic in np.random.shuffle was... not very sensible. Fixes trac
ticket #2074.
This patch also exposes a completely unrelated issue in
numpy.testing. Filed as Github issue #347 and marked as knownfail for
now.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original masked-NA-NEP branch contained a large number of changes
in addition to the core NA support. For example:
- ufunc.__call__ support for where= argument
- nditer support for arbitrary masks (in support of where=)
- ufunc.reduce support for simultaneous reduction over multiple axes
- a new "array assignment API"
- ndarray.diagonal() returning a view in all cases
- bug-fixes in __array_priority__ handling
- datetime test changes
etc. There's no consensus yet on what should be done with the
maskna-related part of this branch, but the rest is generally useful
and uncontroversial, so the goal of this branch is to identify exactly
which code changes are involved in maskna support.
The basic strategy used to create this patch was:
- Remove the new masking-related fields from ndarray, so no arrays
are masked
- Go through and remove all the code that this makes
dead/inaccessible/irrelevant, in a largely mechanical fashion. So
for example, if I saw 'if (PyArray_HASMASK(a)) { ... }' then that
whole block was obviously just dead code if no arrays have masks,
and I removed it. Likewise for function arguments like skipna that
are useless if there aren't any NAs to skip.
This changed the signature of a number of functions that were newly
exposed in the numpy public API. I've removed all such functions from
the public API, since releasing them with the NA-less signature in 1.7
would create pointless compatibility hassles later if and when we add
back the NA-related functionality. Most such functions are removed by
this commit; the exception is PyArray_ReduceWrapper, which requires
more extensive surgery, and will be handled in followup commits.
I also removed the new ndarray.setasflat method. Reason: a comment
noted that the only reason this was added was to allow easier testing
of one branch of PyArray_CopyAsFlat. That branch is now the main
branch, so that isn't an issue. Nonetheless this function is arguably
useful, so perhaps it should have remained, but I judged that since
numpy's API is already hairier than we would like, it's not a good
idea to add extra hair "just in case". (Also AFAICT the test for this
method in test_maskna was actually incorrect, as noted here:
https://github.com/njsmith/numpyNEP/blob/master/numpyNEP.py
so I'm not confident that it ever worked in master, though I haven't
had a chance to follow-up on this.)
I also removed numpy.count_reduce_items, since without skipna it
became trivial.
I believe that these are the only exceptions to the "remove dead code"
strategy.
|
|
|
|
|
|
|
| |
The --cover-inclusive argument means that coverage.py tries to include every
single .py file in the source tree in the coverage report. This leads to test
errors, because it tries to import files like setupscons.py (which will of
course directly fail for anyone not having numscons installed).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Warnings show up when a directory with the same name as a Python file or
compiled extension is seen which doesn't have an __init__.py file in it. This
situation is very common, for example in SciPy where many extensions are
created from source files located under a directory with the same name.
This filter is located within a context manager, so only filters when running
tests.
|
| |
|
| |
|
|
|
|
|
| |
Also document that behavior has to be switched for a release, and remove
comments on turning on deprecation warnings that don't apply anymore.
|
| |
|
|
|
|
|
|
| |
The default is set to (RuntimeWarning, DeprecationWarning), and
the intent is to leave it as this on master, but change it to ()
immediately after branching for 1.7 in that branch.
|
|
|
|
| |
RegressionWarning
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Move numpy-specific parts of the plugin into their own methods, or into
class-level defines. This makes it easier to subclass the plugin. This
in turn may help keep more eyes on the code.
|
|
|
|
|
|
|
| |
NumpyDocTestCase definition overwritten further down the file.
The deleted class only redefined the ``id`` method with the same code
as that in the parent class since before nose 0.10.
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are various docstrings show examples of how to run the tests, and
give example test output. Obviously the test output changes, and
running the doctests for the testing package:
import numpy.testing as npt
npt.test(doctests=True)
will cause several large sets of tests to be run in the rest of the
tree. So I skipped these.
|
|
|
|
|
|
|
|
|
|
|
| |
The numpy doctest extension generates an error with empty doctest output;
this most often comes about with the +SKIP option.
The numpy doctest plugin exposed a nose bug because it accidentally used
a different default for the 'doctest-result-variable'.
nose bug report here:
http://code.google.com/p/python-nose/issues/detail?id=445
|
|
|
|
|
|
|
| |
The doctesting tests were in the code file, and (for me) rather
difficult to run without running lots of other tests. With this change
you can run the doctest tests in isolation by executing the
test_doctesting.py file.
|
|
|
|
|
|
|
| |
Refactor ``prepare_test_args`` method to make it easier for subclasses
to adapt its behavior. This should make it easier for nipy and other
projects to use the numpy testing machinery without wholesale copies
into their source trees.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We previously had a baroque inheritance scheme to deal with the case
where the user had normal nose doctests enabled in their environment.
However, this scheme didn't deal with bench() routine, and was
complicated. This commit uses a null Unplugger plugin to pull the
doctest plugin off the nose configuration after it has been initialized.
We can use this for bench() and test(), and it allows the doctest module
to be enabled (by the user environment) and then thrown away.
Also rejigged the docstrings and removed the automated docstring
addition as the docstrings have already been copied and adapted in the
code.
|
|
|
|
| |
assert in non-testing files that should be checked for correctness.
|
|
|
|
| |
I think that is the end of it.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #1543.
|
| |
|
|
|
|
|
|
|
| |
With this patch, the latest scipy trunk (7087), built against NumPy
1.5.1, passes all tests when run against the numpy trunk. The single
failing test, test_imresize, fails because it tests all float types,
and the new 'half' type lacks the precision to pass that test.
|
| |
|
| |
|