Comments (7)
This is not really public IMO, at least it's not something a user should really be making. If it was something users would be expected to make regularly, it would be slightly more tempting. At the moment, it's more important that it matches the default tuple
so code can support either one.
from boost-histogram.
Yes, I'd add an error if an AxesTuple is not make up of Axes, that part I agreed with. Just not adding convenience syntax.
It is not marked with _, so it is public by style convention
I meant the constructor, not the class; the class is public since it's a type returned from a public method, those always need to be public since they can be statically typed and interacted with - a user needs to be able to look up the methods, etc. Also, it's overridable by library implementations (notably Hist). I meant the constructor is not really public in that it's never documented as directly constructible by a user, and users never need to construct them in normal usage.
from boost-histogram.
I'd be biased toward just throwing an error. Unless we supported AxesTuple(item1, item2, ...)
syntax (which we don't, and neither does tuple
), it just complicates the typing and could confuse users into thinking that would work. I don't think this is constructed by normal users much (at all?), so I think it's fine to be simple and strict. If for some reason this was really needed, we could always remove the error and make it work, but we can't go back the other way and make something that we add support for an error as easily.
Final call is @HDembinski's, though.
from boost-histogram.
I'd be biased toward just throwing an error.
Sure, seems also reasonable to me
Unless we supported
AxesTuple(item1, item2, ...)
syntax (which we don't, and neither doestuple
)
I didn't think about it but this seems actually intriguing to me as it aligns with the rest of the API such as the Histogram init.
But oc fine with anything, an error seems the least altering behavior.
from boost-histogram.
I agree with Henry that we should not add convenience syntax for classes that normal people should not be using, and the init of AxesTuple should precisely follow the init of tuple
.
from boost-histogram.
This is not really public IMO
It is not marked with _
, so it is public by style convention.
from boost-histogram.
I agree with Henry that we should not add convenience syntax for classes that normal people should not be using, and the init of AxesTuple should precisely follow the init of
tuple
.
Okay, I think @henryiii would go for an error, right? But makes sense, I think it's worth to add the error as the object won't function properly if a single axis is given.
Or if you prefer to keep it as is without an error, feel free to close
from boost-histogram.
Related Issues (20)
- Slicing a large histogram is slow HOT 5
- [BUG] Hist.fill does not accept scalars for sample argument HOT 1
- Release the GIL for slices/sums
- [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
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.