Submitted by popcornn1 t3_ydw9wv in MachineLearning
[removed]
Submitted by popcornn1 t3_ydw9wv in MachineLearning
[removed]
.shape
einsum
Import
ipdb.set_trace()
*reshape
you can't reshape without knowing the shape bro
Why this? I have always seen people praise tqdm a lot, but I don't understand why.
Not necessarily a function but the njit decorator from numba.
pandas.DataFrame.query()
In many interesting cases this is actually very possible, e.g. broadcasting x.reshape(1, -1) * y.reshape(-1, 1) Rarely do I need to query the shape explicitly. Mostly a squeeze/unsqueeze leads to the goal. And often one knows the structure of the data explicitly, e.g. the dimensionality of a Euclidean space. I don't want to deny the use case for .shape entirely, but I think often it can be avoided.
can't agree, for unknown shapes I use permute or x.reshape(x.shape/2, x.shape/2) etc
Decorators are functions!
It's nice to know how long something is going to take
.pipe() is another game changer, along with .assign().
I recently discovered you can pass callables to almost ANYTHING in pandas. Things like
df.assign(newcolumn= lambda df: ...
or better yet df[lambda x:....]
and df.loc[lambda x:]
.
Tqdm.pandas()
exit()
apply() with lambdas
I like pudb with classic blue screen
poor debugability
MrHumanist t1_itug1cf wrote
type