Closed
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,
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