Ask Your Question
1

How to load a local image from cloud.sagemath?

asked 2013-05-09 14:26:54 +0200

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 14:40:03 +0200 )edit

4 Answers

Sort by ยป oldest newest most voted
-1

answered 2013-11-25 03:29:05 +0200

arronlee gravatar image

updated 2013-11-25 05:10:19 +0200

ppurka gravatar image

remove spam

edit flag offensive delete link more
0

answered 2013-10-28 01:50:33 +0200

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-09-06 04:18:32 +0200

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
-1

answered 2013-09-06 01:07:59 +0200

updated 2013-11-25 05:10:37 +0200

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-06 04:09:32 +0200 )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 14:26:54 +0200

Seen: 2,517 times

Last updated: Nov 25 '13