Skip to content

Broken example in modeling docs #1624

Description

@mdboom

fitting.rst contains the following example.

>>> from astropy.modeling import *

>>> x = np.arange(1, 10, .1)
>>> p1 = models.Poly1DModel(2, param_dim=2)
>>> p1.parameters = [1, 1, 2, 2, 3, 3]
>>> p1.param_sets
array([[ 1.,  1.],
       [ 2.,  2.],
       [ 3.,  3.]])
>>> y = p1(x)
>>> p1.c1.fixed = True
>>> pfit = fitting.LinearLSQFitter(p1)

The last line raises the exception: InputParameterError: Parameter of <type 'list'> could not be converted to float

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions