-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds on-the-fly enabling of function argument casting #14
Adds on-the-fly enabling of function argument casting #14
Conversation
3a456da
to
24565c8
Compare
The |
Mind twisting, but cool implementation. We can try to keep it and see if it sticks. The main added value, of course, is a support of list-2-list functionality, which is only relevant, if you write quick API gateways. What I'm still puzzled about is how NumPy behaves:
It returns the same type as an input! Pandas, on the other hand, does not do it. In fact, to make use of most of the functions that pandas provide you first need to convert your array-like into Stream/DataFrame and I don't know what is the best strategy to tackle this. My original approach was to add typecasting at the end of each function. |
I tried to figure out how NumPy does this but it looks like they do that in some c library... I don't want to go that way (if only because I'm not comfortable with c...). About the |
There are some methods in pandas that are not available in Another example, that would be a shame not to implement in
|
That's interesting. It makes sense for Numpy to stay more low-level indeed. Is this then the solution?
|
This indeed sounds like a workable solution to me. And what lean startup teaches us - let the users do the talking ;) |
24565c8
to
845bff9
Compare
@sladkovm I finally found time to finish this PR with the input of our discussions. Can you take a look to see if I missed anything? |
845bff9
to
5cb2065
Compare
5cb2065
to
cc7a80f
Compare
Unittests should make clear how it can be used.
I don't necessarily like the implementation (not very transparent to the end user what's happening and it's not very Pythonic) but I realize it serves a purpose for some use-cases. From that perspective I like this approach way more than
if isinstance(..) then
logic in every algorithm.