File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change 29
29
30
30
31
31
describe Flann ::Index do
32
- [ :byte , :float32 , :float64 ] . each do |dtype |
32
+ [ :byte , :int32 , : float32, :float64 ] . each do |dtype |
33
33
context dtype . inspect do
34
34
before :each do
35
35
scale = [ :byte , :int32 , :int64 ] . include? ( dtype ) ? 255 : 1.0
44
44
end
45
45
46
46
47
- context "#build!" do
48
- it "builds a kdtree index with block parameters" do
49
- scale = [ :byte , :int ] . include? ( dtype ) ? 255 : 1.0
50
-
51
- @dataset = NMatrix . random ( [ 1000 , 128 ] , dtype : dtype , scale : scale )
52
- @testset = NMatrix . random ( [ 100 , 128 ] , dtype : dtype , scale : scale )
53
- @index = Flann ::Index . new ( @dataset ) do |t |
54
- t [ :algorithm ] = :kdtree
55
- t [ :trees ] = 4
56
- end
57
- @index . build!
58
- end
59
- end
60
-
61
-
62
47
context "#nearest_neighbors" do
63
48
it "runs without error" do
64
49
@index . nearest_neighbors @testset , 5
You can’t perform that action at this time.
0 commit comments