Comments (3)
No, the argument is correctly passed on (this happens through ;kwargs...
which just takes all keyword argument and so kwargs
can be passed on to functions inside functions).
julia> using BitInformation
julia> a = rand(Float32,100)
julia> bitinformation(a,set_zero_insignificant=true)
32-element Vector{Float64}:
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
⋮
0.0
julia> bitinformation(a,set_zero_insignificant=false)
32-element Vector{Float64}:
0.0
0.0
0.0
0.0
0.0
0.0
0.0040017578752447125
0.00762811148439329
0.004276987851521523
0.00023748155804284116
⋮
0.007157098012580706
0.00791399692709715
0.00480941092599706
0.002926451394794344
0.008214283901808138
0.005549176061803784
0.00359966561437504
0.017224936442887365
0.0059782906996011615
julia> bitinformation(a,set_zero_insignificant=false,masked_value=NaN32)
32-element Vector{Float64}:
0.0
0.0
0.0
0.0
0.0
0.0
0.0038971829878380847
0.005576694247738862
0.005576694247738862
0.0005831180658698092
⋮
0.0059096798906598975
0.006578377952308912
0.003943640725332606
0.004330712596832224
0.006655303074143492
0.004283055423926335
0.002705618353765177
0.018927358053287838
0.006400338428602179
but as you can see the results are not exactly the same, the reason is that to avoid counting information across array bounds currently always the last element in every dimension is masked.
BitInformation.jl/src/bit_count.jl
Line 125 in 5f3ebbd
So as long as you have large datasets all good, but you are right, maybe this should be done differently. Quick check, if you add one more element to your example you'll actually get the same result
julia> bitinformation(Float32[1,2,3,4,5], set_zero_insignificant=false, masked_value=NaN32)
32-element Vector{Float64}:
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.25162916738782287
0.25162916738782287
⋮
from bitinformation.jl.
Just changed the title of this issue because this is really what this is about: Counting information across array bounds is like periodic boundary conditions, if you mask the last element then its like closed boundaries...
from bitinformation.jl.
Alright, thanks for the clarification!
from bitinformation.jl.
Related Issues (16)
- TagBot trigger issue HOT 8
- @inbounds for array rounding HOT 1
- Where is the best place to discuss usage/interpretation/best practices? HOT 30
- Applying BitInformation to compress WRF model results HOT 4
- Discuss best practices for `xr.Dataset.to_netcdf()` HOT 3
- Bitinformation of masked data HOT 14
- use of bitinformation(dim) HOT 5
- Incorrect round away from zero for keepbits=significand_bits HOT 1
- Understanding latitudinal bounds of bitrounding absolute error HOT 11
- Improve Error message when `dim` in `bitinformation(data, dim)` too short HOT 3
- Method definition triggers warning in precompilation HOT 1
- Compressing zarr data store for simulation data HOT 6
- Smallest chunk based on statistics of random information HOT 1
- BitInformation for data previously reduced in precision HOT 5
- Check for NaNs and raise warning
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 bitinformation.jl.