dq.isbra
isbra(x: ArrayLike) -> bool
Returns True if the array is in the format of a bra.
Parameters
-
x
(array_like of shape (...))
–
Array.
Returns
True if the second to last dimension of x
is 1, False otherwise.
Examples
>>> dq.isbra(jnp.ones((1, 3)))
True
>>> dq.isbra(jnp.ones((5, 1, 3)))
True
>>> dq.isbra(jnp.ones((3, 3)))
False