@@ -70,7 +70,7 @@ class OneDimensionalArray(Array):
70
70
def __new__ (cls , dtype = NoneType , * args , ** kwargs ):
71
71
if dtype is NoneType :
72
72
raise ValueError ("Data type is not defined." )
73
- elif len (args ) not in (1 , 2 ):
73
+ if len (args ) not in (1 , 2 ):
74
74
raise ValueError ("Too few arguments to create a 1D array,"
75
75
" pass either size of the array"
76
76
" or list of elements or both." )
@@ -93,7 +93,7 @@ def __new__(cls, dtype=NoneType, *args, **kwargs):
93
93
raise TypeError ("Expected type of size is int and "
94
94
"expected type of data is list/tuple." )
95
95
if size != len (data ):
96
- raise ValueError ("Conflict in the size -> %s and length of data -> %s"
96
+ raise ValueError ("Conflict in the size, %s and length of data, %s"
97
97
% (size , len (data )))
98
98
obj ._size , obj ._data = size , data
99
99
@@ -187,7 +187,7 @@ def __new__(cls, dtype: type = NoneType, *args, **kwargs):
187
187
if dtype is NoneType :
188
188
raise ValueError ("Data type is not defined." )
189
189
elif not args :
190
- raise ValueError ("Too few arguments to create a Multi Dimensional array,"
190
+ raise ValueError ("Too few arguments to create a multi dimensional array,"
191
191
" pass dimensions." )
192
192
if len (args ) == 1 :
193
193
obj = Array .__new__ (cls )
@@ -199,7 +199,7 @@ def __new__(cls, dtype: type = NoneType, *args, **kwargs):
199
199
dimensions = args
200
200
for dimension in dimensions :
201
201
if dimension < 1 :
202
- raise ValueError ("Incorrect dimensions passed, dimension "
202
+ raise ValueError ("Number of dimensions "
203
203
" cannot be less than 1" )
204
204
n_dimensions = len (dimensions )
205
205
d_sizes = []
0 commit comments