Skip to content

Commit

Permalink
Fixed typo in error message (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 authored Oct 11, 2021
1 parent a158395 commit 5cf53a2
Showing 1 changed file with 3 additions and 4 deletions.
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

0 comments on commit 5cf53a2

Please sign in to comment.