3737
3838# Python 3 compatability (needs to go here)
3939from __future__ import print_function
40+ from __future__ import division
4041
4142"""Copyright (c) 2010 by California Institute of Technology
4243All rights reserved.
@@ -470,7 +471,7 @@ def __rmul__(self, other):
470471 return TransferFunction (num , den , dt )
471472
472473 # TODO: Division of MIMO transfer function objects is not written yet.
473- def __div__ (self , other ):
474+ def __truediv__ (self , other ):
474475 """Divide two LTI objects."""
475476
476477 if isinstance (other , (int , float , complex )):
@@ -482,7 +483,7 @@ def __div__(self, other):
482483
483484 if (self .inputs > 1 or self .outputs > 1 or
484485 other .inputs > 1 or other .outputs > 1 ):
485- raise NotImplementedError ("TransferFunction.__div__ is currently \
486+ raise NotImplementedError ("TransferFunction.__truediv__ is currently \
486487 implemented only for SISO systems." )
487488
488489 # Figure out the sampling time to use
@@ -499,7 +500,7 @@ def __div__(self, other):
499500 return TransferFunction (num , den , dt )
500501
501502 # TODO: Division of MIMO transfer function objects is not written yet.
502- def __rdiv__ (self , other ):
503+ def __rtruediv__ (self , other ):
503504 """Right divide two LTI objects."""
504505 if isinstance (other , (int , float , complex )):
505506 other = _convertToTransferFunction (other , inputs = self .inputs ,
@@ -509,7 +510,7 @@ def __rdiv__(self, other):
509510
510511 if (self .inputs > 1 or self .outputs > 1 or
511512 other .inputs > 1 or other .outputs > 1 ):
512- raise NotImplementedError ("TransferFunction.__rdiv__ is currently \
513+ raise NotImplementedError ("TransferFunction.__rtruediv__ is currently \
513514 implemented only for SISO systems." )
514515
515516 return other / self
0 commit comments