Skip to content

Error bars with IndexError Bug #568

@pcwysoc

Description

@pcwysoc

Describe the bug
In objectivefns.py, the function _hessian_from_block generates 'firsts' as a tuple, not a list, which causes lines 4730-4731 to experience an IndexError ('too many indices for array: array is 1-dimensional, but 2 were indexed'.

dprobs12_omitted_coeffs = -self.raw_objfn.zero_freq_hterms(total_counts[firsts], omitted_probs)
hprobs_omitted_coeffs = -self.raw_objfn.zero_freq_dterms(total_counts[firsts], omitted_probs)

To Reproduce
I ran into this when loading a dataset from file and then trying to do GST error bars.

Expected behavior
I think we can fix this by adding firsts=list(firsts) on 4719.

Metadata

Metadata

Labels

bugA bug or regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions