Forum Archive

Ipython, numpy and opening files directly in pythonista

Yalom

Hi guys!

I`m a starter with python and pythonista. I need it for university and would like to work at uni on my ipad. I have some questions regarding the topics in the titel:

1, Can I use ipython in pythonista
2, How can I open a file from the browser directly in pythonista. In other words: How can I open codes from the internet directly in pythonista?
3, How can i import numpy? Is it even possible?

Thank you in advance!

ccc

No.

import requests
requests.get(url).text

import numpy

;-)

Yalom

Hi!

Ok, so no, as in I can`t use ipython. What a pity.

And import request is the answer to my question wether I can open stuff from safari directly on pythonista? If yes, could you please elaborate on that.

I suppose you also meant that I should just use import numpy at the beginning of my code, but I did that and I sadly couldn`t creat arrays. I was trying to creat a more dimensional array by saying

Import numpy as np

A = np.array [[10. , 9. , 3. ], [3. , 4. , 2.]]

And it wasnt working. Im always getting the shape of it (differently btw as in python on my computer...)

JonB

I think you are missing some parenthesis.... that is not valid python!

A = np.array( [[10. , 9. , 3. ], [3. , 4. , 2.]] )