Skip to content

Commit

Permalink
Add key option to unit test.
Browse files Browse the repository at this point in the history
Co-authored-by: Mateusz Sluszniak <[email protected]>
  • Loading branch information
krstopro and msluszniak authored Dec 23, 2023
1 parent 6ff415d commit 2f00229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/scholar/neighbors/random_projection_forest_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ defmodule Scholar.Neighbors.RandomProjectionForestTest do
test "every point is its own leaf when leaf_size is 1" do
key = Nx.Random.key(12)
tensor = x()
forest = RandomProjectionForest.fit(tensor, num_trees: 1, min_leaf_size: 1)
forest = RandomProjectionForest.fit(tensor, num_trees: 1, min_leaf_size: 1, key: key)
leaf_indices = RandomProjectionForest.predict(forest, tensor)
assert Nx.flatten(leaf_indices) == Nx.iota({Nx.axis_size(tensor, 0)}, type: :u32)
end
Expand Down

0 comments on commit 2f00229

Please sign in to comment.