-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Suggestion to simplify implemenation of scitype #155
Comments
Of course, this comment does not address the other "fly in the ointment" which is tables, requiring trait dispatch. |
I'm probably not getting this suggestion 100% in terms of how it is different from what is there now sorry, could you maybe show what it would give in the case of |
I have also been thinking down this line and I like this idea. It makes the codebase simpler. |
So I guess this would imply that |
Well, no, I'm not suggesting we change the definition of scitype for arrays (see Property 3) - only the implementation. According to the definition, we will need to look inside to determine the scitype in the case of We could change the definition, but this would pose some problems. For example, if Perhaps you have a simple replacement for Property 3 that allows us to get everything we want? |
I have often lamented the fact that
scitype
cannot be a map of machine type to type, instead of object to type, because of the infamousCategoricalValue
fly in the ointment. As a workaround to performance problems with arrays, we introducedScitype
, which is a map from type to type. Wouldn't if be simpler if implementingScitype
is the "fallback" responsibility of a convention, and that we only overloadscitype
for problematic cases likeCategoricalValue
? What am I missing here?So, something like (ignoring convention distinctions):
To be clear, I'm not suggesting a change in the definition of
scitype
, only how it is implemented, althoughScitype
is something we may want to make part of the public interface.What got me thinking about this is the case of parametric types like
Sampleable{S}
and a type I'd like to introduce, calledIterator{S}
for lazy loaded data structures. HereS
is the scitype of the objects sampled, or the scitype of the objects iterated, respectively. How to we implement scitypes for these? This is tricky because we may not have an object from which to extract the parameterS
, only its machine type. So in this case we are limited to usingScitype
.Thoughts @OkonSamuel @tlienart
The text was updated successfully, but these errors were encountered: