xtensor icon indicating copy to clipboard operation
xtensor copied to clipboard

"xsci" Project for implementations of scipy interfaces using xtensor

Open spectre-ns opened this issue 2 years ago • 11 comments

It would be awesome if there was a xtensor scipy repo where the community could contribute the algorithms they're writing using xtensor. Just a thought! I know you're busy people. Keep up the good work!

spectre-ns avatar Mar 10 '22 21:03 spectre-ns

I would support the idea! Though, if operations make sense and are robust, I think we could support them here, even if they are not in numpy. After all, we have also namespaces we could use.

tdegeus avatar Mar 14 '22 16:03 tdegeus

@tdegeus My thinking was that you would want to narrow scope of xtensor the same as numpy has done with scipy. Maybe we could add the scipy modules as namespaces instead?

spectre-ns avatar Mar 14 '22 16:03 spectre-ns

Out-of-curiosity : what did you have in mind to add?

tdegeus avatar Mar 14 '22 16:03 tdegeus

I work for a medical device company and find myself building scipy functions all the time using xtensor. Right now I'm working on a savitzky-golay filter and discrete convolution using Toeplitz matrices. Those are admittedly niche but next I'm implementing the scipy equivalent of find_peaks and peak_widths which are pretty useful for a lot of things. I don't know that I will get any up to production quality in the near term but I would like a place to park them if/when I get the time.

spectre-ns avatar Mar 14 '22 16:03 spectre-ns

Sounds great. Publishing algorithm also increases peer-review, so you'd win too

tdegeus avatar Mar 14 '22 17:03 tdegeus

@tdegeus Hopefully I can put together a pull request to xtensor sometime to get this ball rolling!

spectre-ns avatar Mar 14 '22 17:03 spectre-ns

I think it would make sense to have them in a dedicated repo though. The reason is the API might not be stable when we start the repo, and we may not want to have a lot of backward incompatible releases of xtensor. Besides, we may want to keep the scope of xtensor as small as possible.

JohanMabille avatar Mar 14 '22 20:03 JohanMabille

I agree with that logic. I think it would be nice to have a repo where contributors can share the things they've built so xtensor users don't need to reinvent the wheel all the time. I happen to build some stuff similar to scipy for our application and given that it is not proprietary it would be great to contribute to and benefit from what would hopefully grow into a library with the same breadth and utility as scipy. For now I'm just looking for a place to put proposed algorithms when I come up with something generic that would be useful to others. I think starting a repo separate from xtensor might allow more flexibility as you're probably looking to lock down the API?

spectre-ns avatar Mar 14 '22 20:03 spectre-ns

Indeed, I will set up a new repo with a basic skeleton under the xtensor organization.

JohanMabille avatar Mar 14 '22 21:03 JohanMabille

Awesome!

spectre-ns avatar Mar 14 '22 21:03 spectre-ns

I have created a repo to get started on adding some stuff here I'd be fine folding the implementations into a repo owner by the xtensor stack though! :)

https://github.com/spectre-ns/xsci

spectre-ns avatar Apr 03 '22 13:04 spectre-ns

Seems that @wolfv did this a long time ago. Maybe I'll get some time to start contributing.

https://github.com/QuantStack/xsci

spectre-ns avatar Oct 22 '22 00:10 spectre-ns