-
Notifications
You must be signed in to change notification settings - Fork 312
Closed
Labels
Description
Description of the problem
Currently, arrays in arrays.py
look for exact type match of elements before adding an element of the array using type
. This approach is cryptic. Instead, _check_type
should be used. See,
if dtype != type(args[0][i]): |
Well, the following suggests that type
understands the class hierarchy but still it shouldn't be used,
>>> from pydatastructs import DynamicOneDimensionalArray as DODA
>>> from pydatastructs.linear_data_structures.arrays import DynamicArray as DA
>>> type(DA) == type(DODA)
True