Skip to content

CheckedSession.__setattr__ silently does value.astype(dtype) even when unsafe #1168

@gdementen

Description

@gdementen

This is the CheckedSession counterpart to #1164.

class CS(CheckedSession):
    v: CheckedArray(a, dtype=int)

>>> arr = ndtest(a) * 1.6
>>> arr
a   a0   a1
   0.0  1.6
>>> cs = CS(v=arr)
>>> # same with cs.v = arr
>>> cs.v
a  a0  a1
    0   1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions