You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/05/14 08:39:28 UTC

[GitHub] [incubator-mxnet] sxjscience commented on pull request #18313: [Fix][Numpy][WIP] fix mix numpy scalar and MXNet numpy ndarray

sxjscience commented on pull request #18313:
URL: https://github.com/apache/incubator-mxnet/pull/18313#issuecomment-628485821


   ```python
   import jax.numpy as jnp
   import numpy as onp
   # jnp += onp
   a = jnp.ones((10,))
   b = onp.ones((10,))
   a += b
   print(type(a))
   
   # onp += jnp
   a = onp.ones((10,))
   b = jnp.ones((10,))
   a += b
   print(type(a))
   ```
   
   Output: 
   ```
   <class 'jax.interpreters.xla.DeviceArray'>
   <class 'jax.interpreters.xla.DeviceArray'>
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org