Skip to content


gsl_histogram2d_clone() does not return a gsl_histogram_t #14

leto opened this Issue · 3 comments

2 participants




gsl_histogram2d_clone() do cloning only for histograms with setted values
(you can find it in source code for gsl_histogram2d_calloc_range() that calls from gsl_histogram2d_clone()

you can execute something like
gsl_histogram2d_set_ranges_uniform($self->{H}, 1, 100, 1, 100);
in test for CLONE before calling gsl_histogram2d_clone() and test will pass

POD for gsl_histogram2d_clone() also needs in a little modification explaining this behavior


Hmm, however after this it returns Math::GSL::Histogram2D::gsl_histogram2d instead of Math::GSL::Histogram2D.


I think that is fine. This is a "raw" function, which is available for those that like a C-ish coding style and want the fastest code. For those that want an OO-interface, we will create Math::GSL::Histogram2D objects that have a raw() method which returns the underlying Math::GSL::Histogram2D::gsl_histogram2d like other subsystems do.

Thanks for the hint about cloning and having ranges set!

@leto leto closed this in b848634
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.