Skip to content

Commit

Permalink
Update support to jax (#585)
Browse files Browse the repository at this point in the history
The change is minimal since jax tries to mimic numpy already.
  • Loading branch information
manuel-delverme committed Jun 28, 2020
1 parent 8f50866 commit 15f4537
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tensorboardX/x2num.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def make_np(x):
return check_nan(prepare_chainer(x))
if 'mxnet' in str(type(x)):
return check_nan(prepare_mxnet(x))
if 'jax' in str(type(x)):
return check_nan(np.array(x))
raise NotImplementedError(
'Got {}, but expected numpy array or torch tensor.'.format(type(x)))

Expand Down

0 comments on commit 15f4537

Please sign in to comment.