Skip to content

Float kwargs to disp2sqw_eval are passed as nested lists #6

Description

@rebeccafair

If I pass a float kwarg to a simulation function via disp2sqw_eval, it ends up as a nested list. e.g.

>>> cut_sim = m.disp2sqw_eval(m.d1d(qcut), euobj.horace_disp, ('frequency_scale', 1.0, 'intensity_scale', 1.0), fwhh, 'all')
intensity_scale [[1.]]
frequency_scale [[1.]]

The same happens if the arguments are not explicitly named:

>>> cut_sim = m.disp2sqw_eval(m.d1d(qcut), euobj.horace_disp, (1.0, 1.0), fwhh, 'all')
intensity_scale [[1.]]
frequency_scale [[1.]]

Or if only the first argument is set via a scalar

>>> cut_sim = m.disp2sqw_eval(m.d1d(qcut), euobj.horace_disp, 1.0, fwhh, 'all')
intensity_scale [[1.]]
frequency_scale 1.0

This is on Windows with release pace-python 0.1.1, but with my own branch version of euphonic_sqw_models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions