Use numpy histogram in scatter_density#70
Conversation
|
🚀 Deployed on https://664753f21ee1d0c61500dd34--pytometry.netlify.app |
|
Looks good to me, too! |
| test = [ | ||
| "pytest>=6.0", | ||
| "pytest-cov", | ||
| "nbproject", |
There was a problem hiding this comment.
To be honest, I'm not sure why you need nbproject at all. For tests, you only need nbproject_test.
It's used once in the code:
from nbproject._logger import logger (https://github.com/scverse/pytometry/blob/main/tests/test_notebooks.py#L4) and this can easily be replaced with just a print or Python logger statement
| draw into an existing figure. | ||
| figsize (tuple), optional: | ||
| Figure size (width, height) if ``ax`` not provided. Defaults to (10, 10). | ||
| bins (int or tuple), optional: |
There was a problem hiding this comment.
This is a general point, but I don't see the point of typing docstrings when you're using typehints in the function stub (as you should!). It's annoying to keep both in sync. Sphinx picks up the types from the function header anyways.
There was a problem hiding this comment.
I totally agree, I'll open a separate issue!
Hello,
These are the changes related to #64, i.e. about the usage of
np.histogram2dinstead of datashader inscatter_density: the performances are the same, as shown below.I kept the same function signature, except for
cmapwherestr | Colormapis supported, but notListyet (do we often need to use a list of colors as a cmap?)Since datashader is not used in
pytometryanymore, I removed it from the dependencies (as long as it's not needed for another plot), and I also movednbprojectin the test dependencies.I also added a
CHANGELOG.mdfile, I think it's a good practice to have this to keep track of the changes per version, what do you think @mbuttner, @grst?With datashader
With numpy histogram2d