Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

Hi Troops,

Is there a problem with the to_lhs function in the cdb.core.manip library?

I ran the following example and it reported an error "NameError: name 'part'" is not defined in line 137 of cadabra_packages/cdb/core/manip.py

  import cdb.core.manip as manip    
  manip.to_lhs($2a+b+j*b+k*b = c+d$)

I tried to fix that error by changing line 137 to

  to_rhs(ex, parts)   # rename 'part' to 'parts' to match formal parameter name

This resolved the error but threw an error later on, this time at line 80 (in the function get_factor).

I'm running Cadabra 2.2.6 (build 2054.91a1e1510e dated 2019-03-18).

Any help would be greatly appreciated.

Cheers, Leo

in Bug reports by (1.6k points)

1 Answer

+1 vote
 
Best answer

Thanks for reporting this, you are number 2 today ;-) It's now fixed on github, or if you want to patch it locally: just replace that line with to_rhs(ex, *parts).

by (80.3k points)
selected by

Hi Kasper, That fix worked, many thanks. Cheers, Leo

...