Skip to content

pyscamp.selfjoin returns zero vector if m=3 #135

@keichi

Description

@keichi

Describe the bug
pyscamp.selfjoin returns a zero vector if m=3. If m>= 4 the results are correct.

To Reproduce

x = np.random.rand(10)
pyscamp.selfjoin(x, m=3)

gives a zero vector like this:

(array([0., 0., 0., 0., 0., 0., 0., 0.], dtype=float32),
 array([0, 1, 2, 3, 4, 5, 6, 7], dtype=int32))

stumpy gives correct results:

stumpy.stump(x, m=3)
mparray([[0.543935636387785, 4, -1, 4],
         [0.6665659559814567, 5, -1, 5],
         [0.29289592419909743, 7, 0, 7],
         [1.5383853098049423, 1, 1, 6],
         [0.543935636387785, 0, 0, 7],
         [0.6665659559814567, 1, 1, 7],
         [0.6135462405979734, 2, 2, -1],
         [0.29289592419909743, 2, 2, -1]], dtype=object)

Outputs of pyscamp.selfjoin and stumpy.stump are identical if m>=4.

Expected behavior
Output of pyscamp.selfjoin should match stumpy.stump.

System Information

  • OS: Rocky Linux 8.10
  • System Architecture: x86_64
  • Package and Version: pyscamp 4.0.1 installed from source using pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions