Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mathsClass.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,6 +3,7 @@
for i in [("\n".join(c)) for c in [[i for i in p.__doc__.split("\n")] for p in defined_class]]: print(i.encode('utf-8').decode('unicode-escape'))
'''


""" MATRIX CLASS"""
class Matrix():
'''
Expand DownExpand Up@@ -117,6 +118,7 @@ def funcMatrix(dim, func):
return Matrix([[func(i,j) for j in range(dim[1])] for i in range(dim[0])])



""" COMPLEX CLASS """
class Complex():
'''
Expand DownExpand Up@@ -164,6 +166,7 @@ def __mul__(self, other):
def __truediv__(self, other):
return Complex((-other*self).real()/(-other*other).real(),(-other*self).imag()/(-other*other).real())


""" RATIONAL CLASS"""
class Ratio():
'''
Expand Down