Skip to content

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

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

Activity

  1. added this to the 0.35.1 milestone on Mar 9, 2026
  2. self-assigned this
    on Mar 10, 2026
  3. added 2 commits that reference this issue on Mar 27, 2026
    e3bd6ad
    52a448a
  4. added a commit that references this issue on Apr 3, 2026
    e920707
  5. added a commit that references this issue on Apr 14, 2026
    b0ee680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions