-
Notifications
You must be signed in to change notification settings - Fork 21
best way not to lift #193
Comments
The other solution is to define methods like in #185. Can you develop your use case for not lifting? |
I think #185 is a good example. Suppose I want to run through a dataframe, determine which rows are null, and then do something. For example
Admittedly, at the moment I cannot think of a use which cannot be achieved using lifting along with Just thinking out loud here
wouldn't work even if One of the main use cases for null handling in which you really don't want to just return |
This is one of my concerns with automatic lifting. I'm hoping that with the planned To answer your question, to apply a function elementwise without lifting, you could use a comprehension, e.g. |
In theory it's annoying that we don't provide a way to disable lifting, but in practice I'd like to see a real use case before marking this issue as something in need to be fixed in the short term. As @ararslan noted, I hope the nullable rework will help moving beyond this. |
Hm. I'm trying to think if there is some deeper reason why you should never lift. For the record, if v[find(isnull.(v))] .= rand(sum(isnull.(v))) which is pretty damn elegant if you ask me. However, I keep coming back to the example of "selecting" rows. In my original example, the task was "Let me select elements defined by I'm a pretty big proponent of trying to get Edit: By the way, I know this isn't really the appropriate place to ask, but are there still plans to split |
Yes, a general idea would be to have two separate null-like concepts, one like There are querying frameworks for selecting rows, or you should be able to do something like |
I take it the new |
No, it will be a |
Suppose I don't want to lift. Is there something like, for instance,
Since both
broadcast!
andmap
are overridden, the only way of handling this currently, as far as I can tell, is to create a wrapper function that runs your inner function through a "manual" loop.The text was updated successfully, but these errors were encountered: