#5081: Make numpy play nice with Sage types
----------------------------+-----------------------------------------------
 Reporter:  jason           |       Owner:  was     
     Type:  enhancement     |      Status:  new     
 Priority:  major           |   Milestone:  sage-4.0
Component:  linear algebra  |    Keywords:          
----------------------------+-----------------------------------------------

Comment(by fccoelho):

 an example of failure:
 {{{
 from scipy import stats
 stats.uniform(0,15).ppf([0.5,0.7])
 }}}
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
 "/home/Users/fcoelho/.sage/sage_notebook/worksheets/admin/0/code/19.py",
 line 7, in <module>
     stats.uniform(_sage_const_0 ,_sage_const_15 ).ppf([_sage_const_0p5
 ,_sage_const_0p7 ])
   File "/usr/local/sage-3.4/local/lib/python2.5/site-
 packages/SQLAlchemy-0.4.6-py2.5.egg/", line 1, in <module>

   File "/usr/local/sage-3.4/local/lib/python2.5/site-
 packages/scipy/stats/distributions.py", line 112, in ppf
     return self.dist.ppf(q,*self.args,**self.kwds)
   File "/usr/local/sage-3.4/local/lib/python2.5/site-
 packages/scipy/stats/distributions.py", line 563, in ppf
     place(output,cond,self._ppf(*goodargs)*scale + loc)
   File "/usr/local/sage-3.4/local/lib/python2.5/site-
 packages/numpy/lib/function_base.py", line 1357, in place
     return _insert(arr, mask, vals)
 TypeError: array cannot be safely cast to required type

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5081#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to