Skip to content

parse_single_value to handle uints represented as negative numbers #4147

Closed

Description

@ajpotts

A uint may be sent back to the client as a negative number. However, numpy 2.0 no longer natively supports converting a negative number to a uint, so arkouda must handle that case.

Activity

  1. self-assigned this
    on Mar 5, 2025
  2. ajpotts commented on Mar 5, 2025

    @ajpotts
    ContributorAuthor

    I'm wondering if this code is causing the issue:

        proc type MsgTuple.fromScalar(scalar: ?t): MsgTuple throws {
            import NumPyDType;
            const dTypeName = type2str(t);
            if dTypeName == "undef"
                then throw new Error("Unknown scalar type '%s' in MsgTuple.fromScalar".format(t:string));
            return new MsgTuple(
                msg = "%s %s".format(dTypeName, NumPyDType.type2fmt(t)).format(scalar),
                msgType = MsgType.NORMAL,
                msgFormat = MsgFormat.STRING,
                payload = b""
            );
        }
    
  3. added 6 commits that reference this issue on Mar 5, 2025
    2181445
    ff8c57a
    99ae43e
    7509132
    d201673
    3481660
  4. e-kayrakli commented on Mar 6, 2025

    @e-kayrakli
    Contributor

    How could that cause a negative to be sent as uint?

  5. added 5 commits that reference this issue on Mar 6, 2025
    a137bec
    a8e0227
    7776a3d
    dffcfdf
    b78e932
  6. added a commit that references this issue on Mar 12, 2025
    14fe822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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