Skip to content

DescriptorArray.variance = None crashes instead of clearing variances #265

Open

Description

@rozyczko

Finding V-H1 in DEEP_ANALYSIS.md (parent #261).

src/easyscience/variable/descriptor_array.py:320-335 — the final assignment sits outside the if variance is not None: guard:

        # Values must be floats for optimization
        self._array.variances = variance.astype('float')   # None.astype -> AttributeError

Passing None (explicitly allowed by the guard and the docstring) raises AttributeError. There is currently no way to clear variances on an array via this property. The sibling error setter (lines 373-388) handles None correctly in an else branch — mirror that.

Activity

  1. added
    [scope] bug
    [priority] highest
    [area] parameters and descriptors
    on Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [area] parameters and descriptors[priority] highest[scope] bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions