def testIssue2330(self):
    '\n    Make sure return value of jnp.concatenate is a jax.ndarray and is side-effect save\n    '

    def attempt_sideeffect(x):
        x = [x]
        x = jnp.concatenate(x)
        x -= 1.0
        return x
    onp_input = onp.ones(1)
    jnp_input = jnp.ones(1)
    expected_onp_input_after_call = onp.ones(1)
    expected_jnp_input_after_call = jnp.ones(1)
    self.assertIs(type(jnp.concatenate([onp_input])), jnp.DeviceArray)
    attempt_sideeffect(onp_input)
    attempt_sideeffect(jnp_input)
    self.assertAllClose(onp_input, expected_onp_input_after_call, check_dtypes=True)
    self.assertAllClose(jnp_input, expected_jnp_input_after_call, check_dtypes=True)
Make sure return value of jnp.concatenate is a jax.ndarray and is side-effect save
def testIssue2330(self):
    '\n    \n    '

    def attempt_sideeffect(x):
        x = [x]
        x = jnp.concatenate(x)
        x -= 1.0
        return x
    onp_input = onp.ones(1)
    jnp_input = jnp.ones(1)
    expected_onp_input_after_call = onp.ones(1)
    expected_jnp_input_after_call = jnp.ones(1)
    self.assertIs(type(jnp.concatenate([onp_input])), jnp.DeviceArray)
    attempt_sideeffect(onp_input)
    attempt_sideeffect(jnp_input)
    self.assertAllClose(onp_input, expected_onp_input_after_call, check_dtypes=True)
    self.assertAllClose(jnp_input, expected_jnp_input_after_call, check_dtypes=True)