1. German Larrain
  2. ars

Commits

German Larrain  committed 7b71526

utils.matrix: added 'get_as_long_tuple', 'get_as_tuples' methods to Matrix; changed Matrix stubs from 'pass' to raise NotImplementedError; added 'eye' class method to SquareMatrix.

  • Participants
  • Parent commits 6520e00
  • Branches dev-utils

Comments (0)

Files changed (1)

File ars/utils/matrix.py

View file
  • Ignore whitespace
 	###########################################################################
 
 	def transpose(self):
-		pass
+		raise NotImplementedError()
 
 	###########################################################################
 	# properties
 	###########################################################################
 
 	def is_square(self):
-		pass
+		raise NotImplementedError()
 
 	###########################################################################
 	# getters and index accessors
 
 	def get_element(self):
 		"""zero-based index"""
-		pass
+		raise NotImplementedError()
+
+	def get_as_long_tuple(self):
+		raise NotImplementedError()
+
+	def get_as_tuples(self):
+		raise NotImplementedError()
 
 	def flatten(self): # or get_flat
-		pass
+		raise NotImplementedError()
 
 	def get_row(self):
 		"""zero-based index"""
-		pass
+		raise NotImplementedError()
 
 	def get_rows(self):
-		pass
+		raise NotImplementedError()
 
 	def get_column(self):
 		"""zero-based index"""
-		pass
+		raise NotImplementedError()
 
 	def get_columns(self):
-		pass
+		raise NotImplementedError()
 
 
 class SquareMatrix(Matrix):
 	def is_square(self):
 		return True
 
+	@classmethod
+	def eye(cls, size):
+		raise NotImplementedError()
+
 
 class Matrix3(SquareMatrix):
 	"""3x3 square matrix."""