jax.numpy.fromfile#

jax.numpy.fromfile(*args, **kwargs)[source]#

jnp.fromfile 的未實作 JAX 包裝函式。

此函數刻意保持未實作,因為它可能不是純函數,因此不安全用於 JIT 和其他 JAX 轉換。 考慮改用 jnp.asarray(np.fromfile(...)),但如果在 jax 轉換中使用 np.fromfile,則應謹慎,因為它可能會產生消耗檔案物件的副作用; 更多資訊請參閱 常見陷阱:純函數