Skip to content

BUG: Astropy model cannot evaluate scalar input #9

@pllim

Description

@pllim

Using the example from Getting Started:

>>> from tynt import FilterGenerator
>>> f = FilterGenerator()
>>> identifier = 'SLOAN/SDSS.rprime_filter'
>>> filt = f.reconstruct(identifier, model=True)
>>> filt.model(6000)  # BUG: Returns NaN
.../tynt/core.py:97: RuntimeWarning: invalid value encountered in true_divide
  return (mo - mo.min()) * tr_max / mo.ptp()
nan
>>> filt.model([6000, 6001])  # Works                                            
array([0.97632599, 0.        ])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions