-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use numpy histogram in scatter_density #70
Conversation
🚀 Deployed on https://664753f21ee1d0c61500dd34--pytometry.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one comment RE changelog.
Looks good to me, too! |
@@ -41,6 +39,7 @@ dev = [ | |||
test = [ | |||
"pytest>=6.0", | |||
"pytest-cov", | |||
"nbproject", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -54,6 +53,8 @@ def scatter_density( | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally agree, I'll open a separate issue!
Hello,
These are the changes related to #64, i.e. about the usage of
np.histogram2d
instead of datashader inscatter_density
: the performances are the same, as shown below.I kept the same function signature, except for
cmap
wherestr | Colormap
is supported, but notList
yet (do we often need to use a list of colors as a cmap?)Since datashader is not used in
pytometry
anymore, I removed it from the dependencies (as long as it's not needed for another plot), and I also movednbproject
in the test dependencies.I also added a
CHANGELOG.md
file, 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