Ask Your Question
1

How to load a local image from cloud.sagemath?

asked 2013-05-09 07:26:54 -0500

jeanpat gravatar image

Hello, I tried naively to load an image in a worksheet from my cloud.sagemath account. Something like:

from scipy import ndimage as nd
image=nd.imread('~/path/to/image.jpg')

and of course that failed. Is there a way to do that?

thank you

jp

edit retag flag offensive close merge delete

Comments

In the Sage notebook, [this ask.sagemath question](http://ask.sagemath.org/question/1066/upload-data-file-to-notebook) should answer you. But maybe Sagemathcloud does it differently...

kcrisman gravatar imagekcrisman ( 2013-05-09 07:40:03 -0500 )edit

4 answers

Sort by ยป oldest newest most voted
1

answered 2013-09-05 21:18:32 -0500

ppurka gravatar image

You can try this

from scipy import ndimage as nd
image=nd.imread(os.environ['HOME'] + '/path/to/image.jpg')

where your image is located in $HOME/path/to/image.jpg

edit flag offensive delete link more
0

answered 2013-10-27 19:50:33 -0500

William Stein gravatar image

Your question is unclear. However, if you just want to display the image, do this

salvus.file('%s/path/to/image.jpg'%os.environ['HOME'])
edit flag offensive delete link more
-1

answered 2013-11-24 20:29:05 -0500

arronlee gravatar image

updated 2013-11-24 22:10:19 -0500

ppurka gravatar image

remove spam

edit flag offensive delete link more
-1

answered 2013-09-05 18:07:59 -0500

updated 2013-11-24 22:10:37 -0500

ppurka gravatar image

remove spam

edit flag offensive delete link more

Comments

What does C# have to do with Sage and/or Python?

ppurka gravatar imageppurka ( 2013-09-05 21:09:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-05-09 07:26:54 -0500

Seen: 1,635 times

Last updated: Nov 24 '13