Skip to content
Merged
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
7 changes: 3 additions & 4 deletions pydatastructs/linear_data_structures/arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ def __new__(cls, dtype: type = NoneType, *args, **kwargs):
if dtype is NoneType:
raise ValueError("Data type is not defined.")
elif not args:
raise ValueError("Too few arguments to create a multi dimensional array,"
" pass dimensions.")
raise ValueError("Too few arguments to create a "
"multi dimensional array, pass dimensions.")
if len(args) == 1:
obj = Array.__new__(cls)
obj._dtype = dtype
Expand All @@ -199,8 +199,7 @@ def __new__(cls, dtype: type = NoneType, *args, **kwargs):
dimensions = args
for dimension in dimensions:
if dimension < 1:
raise ValueError("Number of dimensions"
" cannot be less than 1")
raise ValueError("Size of dimension cannot be less than 1")
n_dimensions = len(dimensions)
d_sizes = []
index = 0
Expand Down