[sage-support] Re: Error opening notebook with VMPlayer, come back to login prompt

2009-07-03 Thread AG

It worked. Thanks!

On Jul 2, 7:07 pm, William Stein wst...@gmail.com wrote:
 On Fri, Jul 3, 2009 at 2:00 AM, AGgoelan...@gmail.com wrote:

  Thanks for your very quick responses. It seems that the package is not
  being updated. I couldn't find a way of attaching file to the reply so
  I am providing a URL to a screenshot:
 http://picasaweb.google.com/lh/photo/yqYIgeyDKpC9Pmc_F5tQqw?authkey=G...

  Could the package you intended be mpir-1.2.p4? There is such a package
  listed athttp://www.sagemath.org/packages/standard/but I couldn't
  locate mpir-1.2.p2.

 Good thinking.  Try mpir-1.2.p4 and see if it works.

 William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] a question about the plotting in sage

2009-07-03 Thread wxuyec

I have some data from finite element calculating. I record
the value of a variable at every node of each element.
and I had plotted in matlab using the fellowing sentences:
fill(X,Y,Stress_z);
here the X and Y are the arrays of the x and y coordinates.
and the Stress_z is the value of the variable at nodes.

I want to know whether there is a function or how to do
the same thing in Sage?

Thanks a lot!

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: A little question about mod in function definition

2009-07-03 Thread Alasdair

So it seems there are (at least!) two classes of functions; those
which accept symbolic input, like sin:

m(x)=sin(x/2)

and those which don't, such as mod. I had not realized there was such
a distinction.  Thank you all.

-Alasdair

On Jul 2, 5:15 am, William Stein wst...@gmail.com wrote:
 On Wed, Jul 1, 2009 at 8:52 PM, Simon Kingsimon.k...@uni-jena.de wrote:

  Hi Alasdair,

  On 1 Jul., 13:00, David Joyner wdjoy...@gmail.com wrote:
  I think the first tries to use Sage's symbolic expression machinery
  but the second does not.

  Yes, it seems so.

  Using Sage, one should always be aware that  some very handy/fancy
  syntax is only available due to the Sage preparser.

  E.g., some definitions such as f(x) = sin(x) or R.x=QQ[] are not
  valid Python. But when you do this in Sage, it internally becomes
  sage: preparse('m(x)=sin(x)')
  '__tmp__=var(x); m = symbolic_expression(sin(x)).function(x)'

  In your first approach, you get '__tmp__=var(x); m =
  symbolic_expression(mod(x,Integer(10))).function(x)'

  But mod(x,Integer(10)) gives an error, since x is a symbolic variable
  and not an integer, and since mod is not symbolic, in contrast to
  sin:
   sage: type(sin)
   class 'sage.functions.trig.Function_sin'
   sage: type(mod)
   type 'builtin_function_or_method'

 For the record, at some point we may want to make mod work with
 symbolic input.
 I.e., I don't see any reason why at some point in the future we could
 make the following make sense:

  sage: x = var('x')
  sage: f = mod(x, 3)
  sage: f
  Mod(x, 3)
  sage: f.subs(x=5)
  2

 This is already how Mathematica works:

 f := Mod[x,3]; f
 Mod[x, 3]

 f  /.   x - 5
 2

 William
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: a question about the plotting in sage

2009-07-03 Thread wxuyec

As you said, I read the help about the list_plot3d.
It seems to be but not exactly what I want.
I want the value of the variable to be draw by
different colors, which the list_plot3d can't do.

So can you give another favor? Thanks!



On 7月3日, 下午6时26分, David Joyner wdjoy...@gmail.com wrote:
 Maybe list_plot3d is what you want? Type list_plot3d? (without the
 quotes) at the prompt to see examples.

 On Fri, Jul 3, 2009 at 6:03 AM, wxuyecwxu...@sohu.com wrote:

  I have some data from finite element calculating. I record
  the value of a variable at every node of each element.
  and I had plotted in matlab using the fellowing sentences:
  fill(X,Y,Stress_z);
  here the X and Y are the arrays of the x and y coordinates.
  and the Stress_z is the value of the variable at nodes.

  I want to know whether there is a function or how to do
  the same thing in Sage?

  Thanks a lot!
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] scipy binomial pmf

2009-07-03 Thread Mikie

What is the syntax to get the binomial function in Scipy to calculate?
I have tried stats.binom.pmf(1,10,.56,0) etc.
Thanks  for the help.
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: scipy binomial pmf

2009-07-03 Thread William Stein

On Fri, Jul 3, 2009 at 5:27 PM, Mikiethephantom6...@hotmail.com wrote:

 What is the syntax to get the binomial function in Scipy to calculate?
 I have tried stats.binom.pmf(1,10,.56,0) etc.
 Thanks  for the help.

(1) I don't understand the question.  What does your question mean?

(2) Possibly you should also ask on the scipy support list, where
there are likely to be more scipy experts...

-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: jsmath

2009-07-03 Thread John H Palmieri

On Jul 3, 5:05 am, Mikie thephantom6...@hotmail.com wrote:
 Yes, I am not using the notebook.  I have created an API(server) using
 a python script.  It lets the user do interactive calculations from my
 website.  The output is in a textarea and not pretty print as the
 notebook.  I was wondering if jsmath could be used to do pretty
 print.

My guess is that you should look at the jsMath web page for help;
combining what's there with the html/jsmath output from Sage might be
what you need.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: scipy binomial pmf

2009-07-03 Thread Mikie

I am trying to use the binomial pmf function in Scipy.  Forget the
question I will write my own.
Thanx

On Jul 3, 9:32 am, William Stein wst...@gmail.com wrote:
 On Fri, Jul 3, 2009 at 5:27 PM, Mikiethephantom6...@hotmail.com wrote:

  What is the syntax to get the binomial function in Scipy to calculate?
  I have tried stats.binom.pmf(1,10,.56,0) etc.
  Thanks  for the help.

 (1) I don't understand the question.  What does your question mean?

 (2) Possibly you should also ask on the scipy support list, where
 there are likely to be more scipy experts...

 --
 William Stein
 Associate Professor of Mathematics
 University of Washingtonhttp://wstein.org
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: scipy binomial pmf

2009-07-03 Thread Ahmed Fasih

This is also an excellent resource: How To Ask Questions The Smart
Way, by the peerless Eric Steven Raymond:
http://catb.org/esr/faqs/smart-questions.html

On Jul 3, 8:17 pm, Ahmed Fasih wuzzyv...@gmail.com wrote:
 Writing your own is a good way to understand the implementation issues
 that we sometimes unthinkingly rely on, but for production code, it's
 always a good idea to default to the pre-packaged implementation.

 In this case, I think it's the standard issue with Scipy not
 understanding Sage types. This problem is described 
 inhttp://wiki.sagemath.org/faq#Typeissuesusingscipy.2Ccvxoptornumpyfrom...

 sage: import scipy.stats as stats
 sage: stats.binom.pmf(1,10,.56,0)
 ---
 TypeError                                 Traceback (most recent call
 last)
 snip
 TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and
 'numpy.bool_'

 There are numerous fixes to this problem, one of which is:

 sage: stats.binom.pmf(1r,10r,.56r,0r)
 0.0034614823012532187

 As an alternative, if you plan on doing everything in Scipy/Numpy and
 don't mind a fat-fisted approach, you may want to use IPython in Pylab
 mode: start Sage with sage -ipython -pylab and you don't have to
 worry about the preprocessor.

 On Jul 3, 3:30 pm, Mikie thephantom6...@hotmail.com wrote:



  I am trying to use the binomial pmf function in Scipy.  Forget the
  question I will write my own.
  Thanx

  On Jul 3, 9:32 am, William Stein wst...@gmail.com wrote:

   On Fri, Jul 3, 2009 at 5:27 PM, Mikiethephantom6...@hotmail.com wrote:

What is the syntax to get the binomial function in Scipy to calculate?
I have tried stats.binom.pmf(1,10,.56,0) etc.
Thanks  for the help.

   (1) I don't understand the question.  What does your question mean?

   (2) Possibly you should also ask on the scipy support list, where
   there are likely to be more scipy experts...

   --
   William Stein
   Associate Professor of Mathematics
   University of Washingtonhttp://wstein.org
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: a question about the plotting in sage

2009-07-03 Thread Ahmed Fasih

If you can give a minimal example generating X, Y, and Stress_Z in
Sage or Numpy, we'll be in a better position to reproduce the Matlab
output.

Also, check these fine 3d plotting examples for Matplotlib:
http://www.scipy.org/Cookbook/Matplotlib/mplot3D all the examples will
work in Sage since sage includes Matplotlib.

Also consider asking the Matplotlib community for assistance.

On Jul 3, 7:12 am, wxuyec wxu...@sohu.com wrote:
 As you said, I read the help about the list_plot3d.
 It seems to be but not exactly what I want.
 I want the value of the variable to be draw by
 different colors, which the list_plot3d can't do.

 So can you give another favor? Thanks!

 On 7月3日, 下午6时26分, David Joyner wdjoy...@gmail.com wrote:



  Maybe list_plot3d is what you want? Type list_plot3d? (without the
  quotes) at the prompt to see examples.

  On Fri, Jul 3, 2009 at 6:03 AM, wxuyecwxu...@sohu.com wrote:

   I have some data from finite element calculating. I record
   the value of a variable at every node of each element.
   and I had plotted in matlab using the fellowing sentences:
   fill(X,Y,Stress_z);
   here the X and Y are the arrays of the x and y coordinates.
   and the Stress_z is the value of the variable at nodes.

   I want to know whether there is a function or how to do
   the same thing in Sage?

   Thanks a lot!
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---