Jake Vanderplas

Results 424 comments of Jake Vanderplas

Hmm... what that effectively involves is an efficient sorted group-by in the row numbers. Are you certain that scipy is doing that suboptimally, or is that just inherently a slow...

Actually, I take that back. Assuming no duplicates, you could do it as a O[N log N] lexsort on the row & column indices, followed by an O[N] pass to...

Here's some code for fast conversion to csr using numpy routines; csc would be similar: ```python import numpy a snp from scipy.sparse import csr_matrix def to_csr(self): assert self.ndim == 2...

Actually, if the duplicates are pre-summed and the indices pre-sorted, then you could cache the cumulative count of nonzeros (i.e. ``indptr``) and get CSR conversion basically for free!

One note regarding JAX: > JAX does seem to have a few gotchas with seed creation, it can't deal with high-entropy seeds apparently (at least in 0.2.27, released 18 Jan...

> One other thing to point out: the [JAX docs comparing to NumPy](https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html#random-numbers) are wildly outdated/unfair, they use the non-recommended (global state) way of using the legacy API. I'm happy...

Is `latlon=True` really only for a uniform grid? I've been using it pretty regularly for any input – I assumed that it basically means "call m(x, y) automatically", and it...

As far as I know there's no way to automatically install dependencies in Colab at the moment... you basically get a Python 2 or Python 3 kernel, pre-loaded with the...

Yeah, I'm not sure what to do about that because some of the examples in the book don't work correctly with the newer version of skimage...