Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add digitize, geomspace, logspace functions from numpy. #836

Open
1 of 3 tasks
Swoorup opened this issue Jan 13, 2022 · 1 comment
Open
1 of 3 tasks

Comments

@Swoorup
Copy link

Swoorup commented Jan 13, 2022

Add:

  • geomspace
  • digitize
  • logspace

=========================
I only could find linspace in this library. The above would be great to have, working with data binning and histograms.

@dlwh
Copy link
Member

dlwh commented Jan 27, 2022

digitize is in breeze.stats fwiw:

      val x = DenseVector[Double](-0.5, 0.5, 1.5, 2, 0, 2.5)
      val bins = DenseVector[Double](0.0, 1.0, 2.0)
      val result = digitize(x, bins)
      val desiredResult = DenseVector[Int](0, 1, 2, 2, 0, 3)
      assert(result == desiredResult)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants