Skip to content

Commit

Permalink
[numpy] Fix test failures under NumPy 2.0.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 663919481
  • Loading branch information
hawkinsp authored and copybara-github committed Aug 17, 2024
1 parent 890052d commit fc69a03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trax/tf_numpy/examples/mnist/train_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def testRuns(self):
def fake_mnist_data():

def gen_examples(num_examples):
x = np.array(
np.random.randn(num_examples, 784), copy=False, dtype=np.float32)
x = np.asarray(
np.random.randn(num_examples, 784), dtype=np.float32)
y = np.zeros((num_examples, 10), dtype=np.float32)
y[:][0] = 1.
return (x, y)
Expand Down

0 comments on commit fc69a03

Please sign in to comment.