Eg.:
encoders = {SDRCategoryEncoder, ScalarEncoder}
do_magic_and_answer_me_type(encoders[0]) // I want string
do_magic_and_answer_me_type(encoders[1]) // int (or python equivalents)
Longer: The reason why I'm asking, python's list behaves correctly and keeps data types for various elements, while numpy array converts to a common type.
>>>a=[1, 'sweet', 2]
>>>type(a)
type 'list'>
>>> type(a[0])
type 'int'>
>>> type(a[1])
type 'str'>
>>> import numpy
>>> na = numpy.array(a)
>>> type(na)
type 'numpy.ndarray'>
>>> type(na[0])
type 'numpy.string_'>
>>> type(na[1])
type 'numpy.string_'>
>>>
To sum up, I want to either tell what data-type of input an encoder expects, or make numpy.array() behave like python list and keep different data-types.