Menu

mpmath and PyDSTool-data type not understood

Help
Hieu
2011-07-13
2013-11-04
  • Hieu

    Hieu - 2011-07-13

    When I try using both mpmath and PyDSTool in my code, I got the following error:
    Traceback (most recent call last):
      File "case1_PyDSTool.py", line 137, in <module>
        y0 = zeros(2,1)
    TypeError: data type not understood


    This also happens everywhere when an array is initiated. I am using both findroot and Radau integrator for my program :
    from mpmath import sqrt,mpf,,mp,linspace,zeros,exp,log,findroot
    from PyDSTool import *

    I noticed that the error would disappear when PyDSTool was commented out.  I am very new to Python so please help me out. Also, thank you Robert for all of your responses in the previous topic.

     
  • Rob Clewley

    Rob Clewley - 2011-07-13

    Looks like a problem in SymPy. It's not an error from PyDSTool. Are you sure you mean to use mpmath to generate your arrays? I think you'd want to use numpy. Zeros probably requires a tuple as an argument, i.e. zeros((2,1)), but try it in numpy unless you mean to have symbolic arrays.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.