mattloper / chumpy

MIT License
195 stars 118 forks source link

Cannot try demo 'show_tree' #31

Open ChenDRAG opened 5 years ago

ChenDRAG commented 5 years ago

I have some problem trying to try demo 'show_tree', The error message is like this? Have any idea why? I use Python 2.7.12 Thanks a lot.

- - - - - - - - - - - <CODE> - - - - - - - - - - - -

import chumpy as ch

[x1, x2, x3] = ch.array(10), ch.array(20), ch.array(30)
for i in range(3): x2 = x1 + x2 + x3

x2.dr_wrt(x1) # pull cache 
x2.dr_wrt(x3) # pull cache
x1.label='x1' # for clarity in show_tree()
x2.label='x2' # for clarity in show_tree()
x3.label='x3' # for clarity in show_tree()
x2.show_tree(cachelim=1e-4) # in MB

- - - - - - - - - - - </CODE> - - - - - - - - - - - -

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/chumpy/__init__.py", line 118, in demo
    exec('global np\n' + demos[which], globals(), locals())
  File "<string>", line 13, in <module>
  File "/usr/local/lib/python2.7/dist-packages/chumpy/ch.py", line 1009, in show_tree
    assert DEBUG, "Please use dr tree visualization functions in debug mode"
AssertionError: Please use dr tree visualization functions in debug mode
liangwx commented 2 years ago

have you solved it?I meet the same issue