134 Commits

Author SHA1 Message Date
Matthew Johnson
c9aa60102f
Merge pull request #528 from kroq-gar78/cross
Implement cross product and test cases
2019-03-26 07:05:35 -07:00
Roy Frostig
323353ebf4 implement higher-rank cases of lax_numpy.dot in terms of lax.dot_general, avoiding a reshape 2019-03-25 17:31:03 -07:00
Aditya Vaidya
0a5a633d20 Fix dtypes in cross product 2019-03-25 19:29:49 -05:00
Aditya Vaidya
48934dc9d1 Implement cross product and test cases 2019-03-25 18:22:32 -05:00
Matthew Johnson
629c573fd3 handle numpy < 1.14 behavior of isclose 2019-03-22 17:07:10 -07:00
Peter Hawkins
8de992d706 Simplify Gather and Scatter by removing the index_vector_dim.
Use a canonical choice of:
* there is always a vector index dimension
* it is always the last dimension in indices.
2019-03-01 10:34:46 -05:00
Matthew Johnson
c8b9fe23d6 fix #453 in full, more exhaustive tests 2019-02-27 07:50:19 -08:00
Matthew Johnson
02124e31bf fix bug in transpose with order='F' (fixes #453) 2019-02-27 07:42:26 -08:00
Matthew Johnson
acd0150b4e
Merge pull request #426 from google/remove-unused-asarray-case
remove unused jax.numpy.array case (was typo)
2019-02-24 19:13:24 -08:00
Matthew Johnson
43a66701d5 add comment 2019-02-24 19:06:59 -08:00
Matthew Johnson
9815914d74 remove unused jax.numpy.array case (was typo) 2019-02-21 07:55:56 -08:00
Peter Hawkins
b033627f78 Implement np.float_power. 2019-02-21 10:07:33 -05:00
Peter Hawkins
7b0bcbe0a0 Only use binary exponentiation for integer/integer power() calls to avoid gradient problems. 2019-02-21 08:21:11 -05:00
Peter Hawkins
a63a402d7f Implement np.power for integer exponents. 2019-02-20 14:50:16 -05:00
Matthew Johnson
bf4ea4c099 guard against onp.lcm and onp.gcd not existing 2019-02-19 17:28:43 -08:00
Peter Hawkins
7fc4e0237b Implement np.gcd and np.lcm.
Taking the loop primitives out for a spin!
2019-02-19 15:57:22 -05:00
Peter Hawkins
f39292043c Implement np.roll (#70). 2019-02-18 15:52:32 -05:00
Masahiro H
c02fd5903d
Fix typo in comment 2019-02-16 23:29:35 +09:00
Matthew Johnson
2865cfac07 fix shape/dtype promotion order in some numpy funs 2019-02-13 08:59:21 -08:00
Matthew Johnson
bbf33709a6 switch builtin numeric types on six.PY3 2019-02-13 08:31:48 -08:00
Matthew Johnson
8df660e9ea use more _const and _constant_like helpers 2019-02-13 08:25:11 -08:00
Matthew Johnson
ea9c311349 remove 'long' because it's not in py3 2019-02-13 08:15:48 -08:00
Matthew Johnson
9425fa812a add 'long' and 'complex' to pyval promotion logic 2019-02-13 08:14:32 -08:00
Matthew Johnson
cad7db762b improve numpy dtype promo logic on Python scalars 2019-02-13 08:06:37 -08:00
Peter Hawkins
55acfb15e6 Implement np.linalg.norm. 2019-02-07 10:51:55 -05:00
Peter Hawkins
9338d3d704 Implement np.heaviside. 2019-02-06 09:05:53 -05:00
Peter Hawkins
7edd1337f2 Add axis argument to np.stack. Implement np.{dstack,atleast_3d}. 2019-02-06 08:46:11 -05:00
Peter Hawkins
c5433bd892 Implement np.{empty,empty_like,ptp,isreal,iscomplex,sinc,vander,positive}.
Fix bug in definition of `np.imag` for real numbers.
Fix wrong output (pi vs 0) for `np.angle` for negative real numbers. Fix semantics of angle for integers.

Issue #70
2019-02-05 10:29:31 -05:00
Peter Hawkins
84c30f7790
Merge pull request #319 from hawkinsp/numpy
Forward np.{bartlett,blackman,hamming,hanning,kaiser} to numpy.
2019-02-04 21:49:50 -05:00
Matthew Johnson
1a9c945386
Merge pull request #318 from levskaya/master
actually fix nondeterminism in einsum
2019-02-04 18:39:25 -08:00
Peter Hawkins
980ea88bfe Forward np.{bartlett,blackman,hamming,hanning,kaiser} to numpy. 2019-02-04 21:26:58 -05:00
Anselm Levskaya
893cf82898
actually fix the nondeterminism error in einsum batchdims
In the case where front batch_dims are already ordered correctly, fix the batch_names ordering to be correct.
2019-02-04 16:22:39 -08:00
Peter Hawkins
aed00fe335 Add np.{hsplit,vsplit,dsplit,deg2rad,rad2deg,degrees,radians,hypot,reciprocal,product}.
Forward np.{issubsctype,array_str,array_repr} to numpy.
2019-02-04 09:36:30 -05:00
Anselm Levskaya
723e3c46e4
make einsum deterministic, correct.
Fixes a nondeterministic batch-dimension reordering error that was caused by using a python set collection ordering to fix the final output permutations
2019-02-04 03:52:23 -08:00
Matthew Johnson
b16b4ddf4b the many ways to pjit a cat 2019-02-02 16:18:43 -08:00
Matthew Johnson
9f3060a0e6 index_take in terms of gather, delete index_untake
(c.f. #304)
2019-02-02 09:22:37 -08:00
Peter Hawkins
eb80ef68a5 Implement np.take (#70). 2019-02-02 09:20:30 -05:00
Peter Hawkins
fb659e22b9 Fix gradient for np.amin and np.amax.
The JVP rule for `lax.reduce` depends on being able to identify the reducer as a monoid reducer. To get the correct behavior on complex numbers, `np.{amin,amax}` passed a non-standard reducer that compared complex numbers lexicographically as (real, imaginary) pairs. However, this prevented the gradient rule from identifying the reducer.

Instead, change the `lax.min` and `lax.max` to use the Numpy semantics when comparing complex numbers, and change `np.amin` and `np.amax` to use them.

Move the `np._broadcast_shapes` helper into `lax.py` as `lax.broadcast_shapes`.
2019-02-01 11:53:12 -05:00
Peter Hawkins
785ada21cc
Merge pull request #297 from alexalemi/flip{up,lr}
Add flipud and fliplr numpy functions.
2019-02-01 08:45:27 -05:00
Alex Alemi
4c37d2491d Add support for negative indices and tests of rank 3 tensors. 2019-01-31 20:30:38 -08:00
Peter Hawkins
edce0f0ab7 Add np.cumproduct alias for np.cumprod. 2019-01-31 20:22:12 -05:00
Peter Hawkins
a3f0da50fd Work around missing ReduceWindow cases in current Jaxlib release. 2019-01-31 19:27:55 -05:00
Peter Hawkins
26f85310e5 Implement np.{cumsum,cumprod,nancumsum,nancumprod}. 2019-01-31 18:56:06 -05:00
Alex Alemi
2edc509c43 typo in flipud 2019-01-31 13:03:27 -08:00
Alex Alemi
89e3b3a105 Add and numpy functions. 2019-01-31 12:57:43 -08:00
Jonas Rauber
1691ae0a48
added support for np.newaxis to jax.numpy 2019-01-26 10:15:16 +01:00
Peter Hawkins
86d8915c3d Add Sphinx-generated reference documentation for JAX. 2019-01-16 09:13:31 -05:00
Peter Hawkins
4792b9bed3
Merge pull request #231 from hawkinsp/complex
Add preliminary support for np.complex128.
2019-01-15 11:44:27 -05:00
Matthew Johnson
ade92703ec guard np.take_along_axis test in case of old numpy 2019-01-14 14:12:09 -08:00
Matthew Johnson
f7c6284313 add sort_along_axis, no tests (c.f. #220) 2019-01-13 12:17:08 -08:00