You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My biggest fear with small methods like that is to run into the same pitfall as pandas: having a too wide API and then make users to use only (less than) 10% of it.
I wonder if we shouln't encourage users to have an utils.py module in their models instead.
Pandas has indeed a very wide API, but I think it is part of the reason it is so successful. Yes, each user only ever uses 10% of Pandas, but not the same 10% and the long tail of features is important.
Pro arguments
the slice step is very seldom meaningful in the context of labelled arrays so (non Python developers) users do not really know this syntax.
the number one priority of LArray is to make code readable and reverse is IMO much more readable than [::-1].
reverse is probably more easily discoverable than [::-1] for our typical user base. If one of our current users is looking for a way to reverse an axis, there are chances he finds the method. The inverse slice? I don't think so.
Con arguments
it adds more code to maintain. That's a true problem, but I think there are other places where we have more to gain in this regard: e.g. think about how to have less ways to call the functions which accept 23 different types as arguments.
that is two ways to do the same thing and we would promote the one which is not builtin/idiomatic Python.
All in all, I would say the benefits far outweigh the disadvantages for our non-Python expert users. For seasoned Python users, the status quo is clearly better IMO, but this is not our target audience at the moment.
So that we can write:
instead of the much less readable:
The text was updated successfully, but these errors were encountered: