Skip to content

CheckedSession default dtype is confusing and annoying #1163

@gdementen

Description

@gdementen
>>> a = Axis('a=a0,a1')
>>> class CS(CheckedSession):
...     v: CheckedArray(a)
>>> arr = ndtest(a)
>>> arr.dtype
dtype('int64')
>>> cs = CS(v=arr)
>>> cs.v.dtype
dtype('float64')
>>> cs.v = arr
>>> cs.v.dtype
dtype('float64')

When the dtype is not specified, instead of (silently) coercing to float, it should accept any dtype. We asked to check for the axes, not the dtype.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions