28 Commits

Author SHA1 Message Date
Jake VanderPlas
26f2f97805 Document why 'import name as name' is used 2022-12-14 15:07:04 -08:00
Peter Hawkins
ba557d5e1b Change JAX's copyright attribution from "Google LLC" to "The JAX Authors.".
See https://opensource.google/documentation/reference/releasing/contributions#copyright for more details.

PiperOrigin-RevId: 476167538
2022-09-22 12:27:19 -07:00
Jake VanderPlas
5782210174 CI: fix flake8 ignore declarations 2022-04-21 13:44:12 -07:00
Jake VanderPlas
245581411e Add PEP484-compatible export for jax and its subpackages 2021-09-13 14:08:48 -07:00
Peter Hawkins
3ac809ede3 [JAX] Move jax.util to jax._src_util.
PiperOrigin-RevId: 351234602
2021-01-11 14:21:07 -08:00
Peter Hawkins
aa107cf1f4 Move jax.numpy internals into jax._src.numpy. 2020-10-16 20:35:19 -04:00
Srijan Saurav
40e20242db
Fix code quality issues (#4302)
Changes:
- Fix unnecessary generator
- Iterate dictionary directly instead of calling .keys()
- Remove global statement at the module level
- Use list() instead of a list comprehension
- Use with statement to open the file
- Merge isinstance calls
2020-09-17 09:21:18 -07:00
Alex Dragan
412b9d5209
hfft and ihfft implementation (#3664) 2020-07-10 10:34:59 -07:00
Jake Vanderplas
0a6b715cd4
Add _NOT_IMPLEMENTED attribute to jax.numpy (fixes #3689) (#3698) 2020-07-09 16:31:08 -07:00
Jake Vanderplas
b813ae3aff
Cleanup: record names in get_module_functions (#3697) 2020-07-08 14:44:49 -07:00
Jake Vanderplas
5dfff9eaab
Cleanup: move _wraps into jax.numpy._utils. (#2987)
Why? This prevents circular imports within the numpy submodule.
2020-05-06 15:17:55 -07:00
Peter Hawkins
2f09e89e72
Update internal aliases to lax_numpy to jnp instead of np. (#2975) 2020-05-05 20:41:57 -04:00
Peter Hawkins
b1bc841ae5
Replace np -> jnp, onp -> np in more places. (#2973)
* Replace np -> jnp, onp -> np in more places.

Context: #2370

* Fix typo in random_test.py
2020-05-05 16:40:41 -04:00
Jonas Adler
4080a1c2ce
Add np.fft.fftshift/ifftshift (#1850) 2020-02-04 07:24:10 -08: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
a5b6e8abf3
Real valued FFTs (#1657)
* WIP: real valued fft functions

Note: The transpose rule is not correct yet (hence the failing tests).

* Fix transpose rules for rfft and irfft

* Typo fix

* fix test failures in x64 mode

* Add 1d/2d real fft functions, plus docs
2020-01-13 14:59:00 -08:00
archis
8b6f660d26 removed redundant comments 2020-01-10 16:33:17 -08:00
archis
05f09fc935 added rfftfreq, tests, and documentation link. 2020-01-10 16:31:47 -08:00
archis
1e8c9384f0 added fftfreq, corresponding tests, and documentation links. 2020-01-06 22:56:00 -08:00
Archis Joglekar
ca15512932 added fft2 and ifft2, corresponding tests, and documentation links. (#1939) 2020-01-04 18:21:30 -08:00
Archis Joglekar
d9c6a5f4a8 fft and ifft implementation (#1926)
* first commit with placeholders for tests

* added tests for the following:
1 - inverse
2 - dtypes
3 - size
4 - axis

added error tests for the following:
1 - multiple axes provided instead of single axis
2 - axis out of bounds

* removed placeholders
added functions to .rst file
2020-01-02 17:35:22 -08:00
Stephan Hoyer
a14a05d1f2
Support transforms along arbitrary axes with jax.numpy.fft (#1906)
* Support transforms along arbitrary axes with jax.numpy.fft

Fixes GH-1878

The logic that attempted to check for transformations along non-innermost axes
was broken.

Rather than fixing it, this PR adds support for these transformations by
transposing and untransposing arrays. This adds some overhead over the LAX
implementation, but it suspect it is minimal in most cases and it should be
worthwhile for the sake of completeness.

* Fixes per review
2019-12-22 22:43:07 -07:00
Peter Hawkins
f4aa5150e8
Move internal type-related functions into a new (internal) jax.types … (#1695)
* Move internal type-related functions into a new (internal) jax.types module.

Avoid calling onp type functions in lieu of the wrappers in jax.types. Currently these do the same thing, but future changes will make the behavior of the jax type functions diverge from the classic NumPy versions in some cases.

Move xla_bridge.canonicalize_dtype into jax.types, since it fits there more naturally.

* Rename jax.types to jax.dtypes.

* s/types/dtypes/ in tests.
2019-11-15 10:02:51 -05:00
Stephan Hoyer
89c90923db Add np.fft.ifftn (#1594)
Fixes GH1010
2019-10-30 10:40:02 -07:00
Skye Wanderman-Milne
5d1c014509 Initial FFT support.
This change creates a new fft primitive in lax, and uses it to implement numpy's np.fft.fftn function.

Not-yet-implemented functionality:
- vmap
- 's' argument of fftn
- other numpy np.fft functions

Resolves #505.
2019-05-16 14:37:30 -07:00
Matthew Johnson
a285017110 fix failing tests (misc small bugs) 2018-12-13 11:52:41 -08:00
Peter Hawkins
dad72f94da Add missing license header to Python files. 2018-12-12 08:45:06 -05:00
Alex Wiltschko
0b7bed8778 Adding unimplemented functions to numpy.random, numpy.fft and numpy.linalg 2018-12-11 12:44:02 -05:00