Sympy: Deprecated kanes_equation method

Created on 31 Mar 2016  路  3Comments  路  Source: sympy/sympy

The kanes_equation() under KanesMethod will be deprecated for a more ideal api in which the order of argument is switched from (loads, body) to (body, load). The reasoning is that sometimes there is no load therefore it makes more sense to have the body first and have an optional load. For details please see #10878.

Deprecation Removal

Most helpful comment

Since people will turn to this issue when upgrading SymPy I thought I could provide an easy snippet which should work both with SymPy v1.0 and later:

try:
    (fr, frstar) = KM.kanes_equations(bodies=BL, loads=FL)
except TypeError:
    (fr, frstar) = KM.kanes_equations(FL, BL)

All 3 comments

The new argument order is now active and putting in the forcing list first raises the deprecation warning as desired. I'm confused though because the documentation does not reflect this change online (look for .kanes_equations() here and here) Adding to the confusion though is looking in the source code you did make the correct alterations to reflect your change (link and link are both correct) @moorepants Why is the online documentation not reflecting the changes?

The online docs do not reflect the change for one of two reasons:

  1. You are looking at SymPy 1.0 docs and this is development.
  2. The dev docs are updated manually and are not always in sync with the latest master.

Since people will turn to this issue when upgrading SymPy I thought I could provide an easy snippet which should work both with SymPy v1.0 and later:

try:
    (fr, frstar) = KM.kanes_equations(bodies=BL, loads=FL)
except TypeError:
    (fr, frstar) = KM.kanes_equations(FL, BL)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

JohnStone2017 picture JohnStone2017  路  6Comments

ritesh99rakesh picture ritesh99rakesh  路  5Comments

GarkGarcia picture GarkGarcia  路  4Comments

cbm755 picture cbm755  路  5Comments

kamimura picture kamimura  路  3Comments