Skip to content

Future waring in spec.py parser for numpy.vstack #51

Open

Description

@KennethNielsen

When running the tests, the following warning appears:

  /home/kenneth/venv/PyExpLabSys/PyExpLabSys/file_parsers/specs.py:507: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
    vstack = np.vstack(self.iter_scans)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Activity

  1. KennethNielsen commented on Nov 10, 2022

    @KennethNielsen
    MemberAuthor

    I think it should be simple enough to fix, most likely changing the line to:

    vstack = np.vstack(list(self.iter_scans))

    but I'd rather not do it without the ability to test it live.

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