jax.Array.compress

jax.Array.compress#

abstract Array.compress(condition, axis=None, *, out=None, size=None, fill_value=0)[source]#

返回该数组沿给定轴的选定切片。

有关完整文档,请参考 jax.numpy.compress()

参数:
  • self (Array)

  • condition (ArrayLike)

  • axis (int | None)

  • out (None)

  • size (int | None)

  • fill_value (ArrayLike)

返回类型:

Array