Fix: replace notimplemented by NotImplementedError
This commit is contained in:
parent
d45ab560c9
commit
6e24756746
@ -55,11 +55,11 @@ class Polynomial(Token):
|
||||
|
||||
@classmethod
|
||||
def random(cls):
|
||||
raise NotImplemented
|
||||
raise NotImplementedError
|
||||
|
||||
def __setitem__(self, key, item):
|
||||
""" Use Polynomial like if they were a dictionnary to set coefficients """
|
||||
raise NotImplemented("Can't set coefficient of a polynomial")
|
||||
raise NotImplementedError("Can't set coefficient of a polynomial")
|
||||
|
||||
def __getitem__(self, key):
|
||||
""" Use Polynomial like if they were a dictionnary to get coefficients
|
||||
@ -104,7 +104,7 @@ class Polynomial(Token):
|
||||
@property
|
||||
def roots(self):
|
||||
""" Get roots of the Polynomial """
|
||||
raise NotImplemented("Can't compute roots not specific polynomial")
|
||||
raise NotImplementedError("Can't compute roots not specific polynomial")
|
||||
|
||||
|
||||
class Linear(Polynomial):
|
||||
@ -142,7 +142,7 @@ class Linear(Polynomial):
|
||||
|
||||
@classmethod
|
||||
def random(cls):
|
||||
raise NotImplemented
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def a(self):
|
||||
@ -213,7 +213,7 @@ class Quadratic(Polynomial):
|
||||
|
||||
@classmethod
|
||||
def random(cls):
|
||||
raise NotImplemented
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def a(self):
|
||||
@ -238,7 +238,7 @@ class Quadratic(Polynomial):
|
||||
elif self.delta._mo == 0:
|
||||
return [Expression.from_str(f"-{self.b}/(2*{self.a})").simplify()]
|
||||
else:
|
||||
raise NotImplemented("Todo!")
|
||||
raise NotImplementedError("Todo!")
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user