Pythonista-Issues icon indicating copy to clipboard operation
Pythonista-Issues copied to clipboard

Scipy for Pythonista

Open controversial opened this issue 8 years ago • 36 comments

The scipy library is a scientific computing library for Python. It integrates nicely with numpy, which is already included in Pythonista.

Including scipy with Pythonista would mean we'd have all the dependencies in place for the easy inclusion of lots of really powerful libraries like:

controversial avatar Jun 16 '16 20:06 controversial

I can't believe nobody else is commenting on this. Yes, scipy and scikit-learn would make pythonista a dream come true for anybody who does scientific computing. It would be nice to have a comment from the author, wether this is an impossible feature to add or it just requires time.

zaino avatar Jul 13 '16 22:07 zaino

@zaino No need to get angry :) If you check the language composition of scipy on GitHub (click on the multicolored bar under the commits/branches/releases/contributors links for detailed numbers) you'll see that over half of the code is not written in pure Python, but in compiled languages like C, C++ and Fortran. C and C++ are supported by the iOS development tools, which means that those parts would be reasonably easy to port. However @omz has said before (I think) that there is no Fortran compiler targetting iOS (aside from Fortran-to-C translators), which makes it basically impossible for him to port the 22.5 % of Fortran code in the repo to iOS.

Believe me, many people have requested the additon of scipy, but as I understand it it's not an easy thing to do, so it's unlikely to be added in the near future.

dgelessus avatar Jul 13 '16 23:07 dgelessus

I didn't mean to come out as angry sorry! It all makes sense, I just wonder how the heck the author of Computable manage to have it working on iPad. True, that app was pulled from the store, but I had it for a while and it was working pretty well.

zaino avatar Jul 14 '16 05:07 zaino

My App has integrated numpy, matplotlib, scipy, scikit-learn, now migrating scikit-image. https://twitter.com/MobileAnalyser

MobileAnalytics avatar Aug 23 '16 04:08 MobileAnalytics

@dgelessus Also remember that Computable used to have it 🤔

controversial avatar Aug 25 '16 16:08 controversial

I hope we can figure this out sooner or later.

wgaylord avatar Oct 01 '16 22:10 wgaylord

Seconded! Scipy for Pythonista would be really great for scientific computing.

paanvaannd avatar Feb 07 '17 20:02 paanvaannd

@paanvaannd Add a thumbs up on the original issue if you'd like to see this implemented

controversial avatar Feb 07 '17 20:02 controversial

@omz http://apple.stackexchange.com/a/157502/133916 looks like a solution that people have had success with in the past that doesn't involve Fortran to C translation

controversial avatar Feb 07 '17 20:02 controversial

So, a year down the line, any progress on the matter? Having SciPy or an equivalent is quite detrimental for my consideration on whether to get Pythonista for scientific data analysis on the go

MooMinIL avatar Jun 17 '17 11:06 MooMinIL

I would definitely need scipy on iOS, being used as a basis in hundreds of open source project on the scientific computing.

I hope to have good news soon...

alby3z avatar Jul 10 '17 01:07 alby3z

Search 'scipy' in AppStore

MobileAnalytics avatar Jul 12 '17 03:07 MobileAnalytics

I'd argue that many of the most useful modules from SciPy in iOS programming are backed by C/C++ modules notably signal and image modules.

The Fortran backed stuff is obviously useful (optimization etc) but IMO understable omission given toolchains.

maedoc avatar Aug 21 '17 00:08 maedoc

Hi, i really need it.

jmbenedetto avatar Sep 06 '17 09:09 jmbenedetto

Just adding my voice that this would be great if possible...

nsedlmayr avatar Nov 02 '17 10:11 nsedlmayr

🍺

cclauss avatar Nov 02 '17 18:11 cclauss

Another Scipy and Pythonista aficionado here, I would love the app even more with Scipy :)

ghost avatar Nov 03 '17 09:11 ghost

https://apple.stackexchange.com/a/157502 describes cross compilation w/ Fortran support, might make this issue feasible

maedoc avatar Nov 03 '17 11:11 maedoc

Anyone got a straight answer about this issue? All i’ve been seeing is users asking for implementation

MooMinIL avatar Nov 30 '17 00:11 MooMinIL

The official answer is no, there is no scipy in Pythonista. omz has never said whether or not he wants to add scipy at some point, but it doesn't seem like that will happen in the near future. I think he's well aware that it's an often requested library, but if it's not something he wants to add at the moment, that is his decision.

dgelessus avatar Nov 30 '17 00:11 dgelessus

If the build for numpy were open sourced, we could probably adapt for SciPy, to lower work required for omz

maedoc avatar Nov 30 '17 12:11 maedoc

@maedoc @controversial @zaino This guy seems to have done it, although in a different app (sadly, no longer in the App Store): https://github.com/ktraunmueller/Computable/blob/master/python-ios/scripts/build-scipy.sh

preslavrachev avatar Sep 11 '18 11:09 preslavrachev

that's a neat trick, to use f2c, but curious if that actually works wtih scipy.

maedoc avatar Sep 11 '18 11:09 maedoc

I’d love to know whether ios12 has brought us any closer to having scikit-learn on Pythonista, or the iPad in general. Without this, there seems to be no point in adopting Pythonista for data science purposes.

marko-stojovic avatar Nov 03 '18 11:11 marko-stojovic

As a temporary alternative such a solution: https://forum.omz-software.com/topic/4200/data-analysis-workflow/17

NikolayChuv avatar Nov 05 '18 14:11 NikolayChuv

I’d love to know whether ios12 has brought us any closer to having scikit-learn on Pythonista, or the iPad in general.

it's a toolchain/compiler problem, not a iOS version issue: SciPy has parts written in Fortran which isn't supported by the iOS toolchains

Without this, there seems to be no point in adopting Pythonista for data science purposes.

iOS isn't a great place to be doing data science tbh

maedoc avatar Nov 05 '18 14:11 maedoc

I will agree with this. I use my ipad and phone mostly for data collection. Or simple things. I then move the data to my server or laptop which has much more processing power to actually do the full analysis of the data. Tho it would be cool to have some of the signal stuff thats in SciPy but there are pure python packages that can do that.

wgaylord avatar Nov 05 '18 15:11 wgaylord

I'm wondering if there is any alternative of Griddata of Scipy for iOS development that you could suggest.

KacemRostom avatar Jan 02 '19 16:01 KacemRostom

On Android, there is a python compiler “pydroid” which can compile c,c++ and fortran, so it can install python packages even they contain native code. I hope the same thing can be done on iOS(maybe it’s not so easy because Android is quite different from iOS)

IvenDong avatar Mar 11 '19 11:03 IvenDong

No that can not be done because the compiled code wouldn't be signed

scj643 avatar Mar 11 '19 12:03 scj643