Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

gsl_histogram2d_clone() does not return a gsl_histogram_t #14

leto opened this Issue Aug 17, 2011 · 3 comments


None yet
2 participants

leto commented Aug 17, 2011



tadam commented Sep 4, 2011

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


tadam commented Sep 5, 2011

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


leto commented Sep 6, 2011

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 Sep 6, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment