Comments (8)
We need to set some rules and then follow them consistently.
-
Classes and functions should go by the same names.
-
Pure accessor methods can be properties, like .rank and .size. Methods which actually compute something should stay methods, even if they do not accept arguments (currently). As you said, it is more future-proof to use methods.
-
and 4. "Settable methods", are there any? I don't like .content for indexed and I don't like a Python version of indexed.
from boost-histogram.
Boost-Histogram is not ready for a release, if by release you mean a version that is a fixed interface that we are not going to change in future versions. I have a couple of issues with the current interface of Boost-Histogram and those need to resolved before a release.
from boost-histogram.
By release, I mean an alpha version on PyPI that people can more easily test. It would come with alpha-status warnigns but we will need to get further testing from groups interested in trying boost-histogram. But we will try to provide a reasonably stable interface if possible - don't worry too much by the "few days", it might be 1-3 weeks, and that would be okay.
from boost-histogram.
Ok, but there can be no release before we settle the open issues regarding the interface.
from boost-histogram.
I think we can close this with the compromise:
Free functions in boost::histogram are also free functions here, and in addition there are methods with the same name attached to the histogram class. This way there is some interface bloat, but numpy is doing something similar so it is not all that surprising.
I understand that methods are useful for people who use IDEs with certain types of autocompletion. Since the C++ library uses free functions, however, the Python interface should also support that, to not put mental strain on people who use both the C++ and the Python interface.
from boost-histogram.
Can we make histogram::rank and histogram::size into properties?
from boost-histogram.
Yes
from boost-histogram.
I think all these are changed/fixed, correct? Can we close?
from boost-histogram.
Related Issues (20)
- [BUG] (Discussion) Input validation/preprocessing in AxesTuple HOT 7
- [BUG]: Scaling a weighted histogram does not appropriately scale the variance HOT 6
- [FEAT] Add operators (mult/div/sub) for (weighted) histograms/accumulators HOT 6
- [BUG] np.cumsum fails on views with non-default storage type
- [BUG] Failure to conver awkward Masked array to numpy HOT 3
- [BUG] Indexing along two axes with list and single index raises RuntimeError
- [DOCS] add documentation for Nox
- [DOCS] change all the code directives to code-block
- [BUG] Investigate providing a better error message if sample= is missing
- [FEAT] Scaling a slice of a histogram
- [BUG] Cannot get index of huge numbers in IntCategory HOT 1
- [BUG] Issues with copying in child classes of weighted Histogram
- [FEAT] in multidimensional histograms allow the binning to vary along an axis
- Inconsistent filling of values on bin edges [BUG] HOT 1
- [FEAT]: Add -latomic link arg for armv7l machines HOT 3
- Pickling a histogram creates an extra copy of the array in memory HOT 1
- [BUG] Filling Integer Axis with doubles is buggy
- Version 1.4.0 and roadmap
- *Category axes do not support disabling overflow
- [BUG] Filling with unsigned ints in IntCategory axis raises TypeError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boost-histogram.