def test_variable_initialization_with_python_array(self):
        """Test variable init with python array initializer."""
        v = backend.Variable(initializer=[[1, 1], [1, 1]], trainable=False)
        self.assertAllClose(v.value, np.ones((2, 2)))
        self.assertEqual(v.dtype, "int32")
        v = backend.Variable(
            initializer=[[1.0, 1.0], [1.0, 1.0]], trainable=False
        )
        self.assertAllClose(v.value, np.ones((2, 2)))
        self.assertEqual(v.dtype, "float32")
Test variable init with python array initializer.
keras/src/backend/common/variables_test.py