larray-project / larray

N-dimensional labelled arrays in Python
https://larray.readthedocs.io/
GNU General Public License v3.0
8 stars 6 forks source link

Implements valuecounts function #986

Closed gdementen closed 2 years ago

gdementen commented 2 years ago

AFAIK, I only need to update api.rst for this PR to be ready, but I hesitate to change the function into a method.

A method is more consistent with the rest of LArray but a function is more powerful (can work on any sequence, np.ndarray, etc.). What do you think?

alixdamman commented 2 years ago

A method is more consistent with the rest of LArray but a function is more powerful (can work on any sequence, np.ndarray, etc.). What do you think?

Our users usually get stick to manipulate LArray objects. Let's start with a method and IF there is a demand, create an extra function (and make the method to call that function).

gdementen commented 2 years ago

Our users usually get stick to manipulate LArray objects. Let's start with a method and IF there is a demand, create an extra function (and make the method to call that function).

ok

gdementen commented 2 years ago

FWIW (for my own information, when I'll work on this again), the failed checks are flake8 stuff: _____ FLAKE8-check(ignoring W503) __ /home/runner/work/larray/larray/larray/core/ufuncs.py:5:1: F401 'larray.sequence' imported but unused /home/runner/work/larray/larray/larray/core/ufuncs.py:5:1: F401 'larray.ndtest' imported but unused /home/runner/work/larray/larray/larray/core/ufuncs.py:336:45: W292 no newline at end of file