13 Commits

Author SHA1 Message Date
Jake Vanderplas
29aa9bfc8f
Cleanup: avoid jnp.prod & np.prod on array shapes (#4086) 2020-08-18 10:17:38 -07:00
Julius Kunze
7de784afbf
Fix _CheckAgainstNumpy arg order (#3935) 2020-08-03 11:17:48 -04:00
Claudio Fantacci
150d028d9d
Update scipy.ndimage.map_coordinates docstring (#3762) 2020-07-15 11:19:40 -07:00
Jake Vanderplas
512ed18d5a
Cleanup: convert uses of 'import numpy as onp' in tests (#3756) 2020-07-14 13:03:24 -07:00
Jake Vanderplas
19adce595c
Cleanup: use test_util dtypes where possible (#3695)
* Cleanup: use test_util dtypes where possible

* fix issue in fft test

* fix duplicate test name issue
2020-07-08 13:21:48 -07:00
Jake VanderPlas
afce718eb1 Add ability to specify individual test targets 2020-06-29 11:08:57 -07:00
Jake Vanderplas
9ee4ef1107
Cleanup: de-lint tests directory & add flake8 to travis (#3304)
* Cleanup: fix lint errors in tests/*.py

* Add flake8 step to travis

* add setup.cfg
2020-06-02 19:25:47 -07:00
Peter Hawkins
fffdb2daa8
Make check_dtypes, atol, and rtol keyword-only arguments in jax.test_… (#3280)
* Make check_dtypes, atol, and rtol keyword-only arguments in jax.test_util APIs.
Default to check_dtypes=True.

Remove explicit usages of check_dtypes=True from tests. This mostly just removes visual noise from tests. Testing for exact type equality is the sensible default, although there are cases where opting out makes sense.

No functional changes intended.

* Fix a number of lax reference implementations to preserve types.
2020-06-01 17:19:23 -04:00
Penn
de800d2046
fix #3165 if round half up behavior is desired (#3166)
* fix issue 3165 if round half up behaviour is desired

* add test for round half

* fix integer array input and and add to test

* fix truncated integer output

* match input and output dtypes

* fix asymmetric rounding and extend test

* use lax for rounding
2020-05-22 15:41:37 -07:00
Stephan Hoyer
460343293f
Fix gradient for jax.scipy.ndimage.map_coordinates (#3110)
* Fix gradient for jax.scipy.ndimage.map_coordinates

Fixes GH3024

* minor refactor for clarification
2020-05-18 15:13:54 -07:00
Peter Hawkins
7116cc5b41
Improve JAX test PRNG APIs to fix correlations between test cases. (#2957)
* Improve JAX test PRNG APIs to fix correlations between test cases.

In #2863, we observed that we were missing gradient problems because the random test cases being generated were too similar because they were formed with identically seeded PRNGs. This change updates the test_util.rand_...() functions to take an explicit numpy.random.RandomState, and adds a rng() method to JaxTestCase to form a RandomState seeded on the test case name.

This gives the following properties:
* different test cases receive different seeds
* PRNG seeding is deterministic and independent of execution order and sharding.
* PRNG seeding is deterministic across runs.

* Fix some failing tests.

* Fix more test failures.

Simplify ediff1d implementation and make it more permissive when casting.

* Relax test tolerance of laplace CDF test.
2020-05-04 23:00:20 -04:00
Peter Hawkins
e60d5dd54c
Remove "from __future__" uses from JAX. (#2117)
The future (Python 3) has arrived; no need to request it explicitly.
2020-01-29 12:29:03 -05:00
Stephan Hoyer
65f0556ead
Add support for scipy.ndimage.map_coordinates with order=0 and order=1 (#1711)
* Add support for scipy.ndimage.map_coordinates with order=1

Higher dimensional interpolation will be a bit trickier, but this should
already be useful.

* move around docstring

* dtype fixes, more tests

* fixup float32 tests

* Handle order=0

* Tests for errors from map_coordinates
2019-11-19 17:14:09 -08:00