Skip to content

Classify vector quantity strings without ambiguous array truth values #80

Description

@LMMV

What — pyunitwizard.forms.api_string.is_unit("[0, 0, 0] nm") returns an array comparison whose truth value raises ValueError during puw.standardize. A vector quantity string must be classified as a quantity, not as a unit.

How — In a configured Pint session, call puw.standardize("[0, 0, 0] nm"). api_string.is_unit compares the vector magnitude to 1 and returns a boolean array. Add a regression test for vector strings and return a scalar bool from unit detection.

Why — Six PharmacophoreMT tests that construct spherical interaction sites fail through shape/sphere.py; this blocks the MolSysSuite policy migration in uibcdf/pharmacophoremt#3.

Record — devguide/pending_bugs/string_vector_unit_detection.md

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions