Skip to content

fixing numpy row_stack deprecation#227

Merged
tshead2 merged 1 commit intosandialabs:mainfrom
harmsm:main
Mar 13, 2026
Merged

fixing numpy row_stack deprecation#227
tshead2 merged 1 commit intosandialabs:mainfrom
harmsm:main

Conversation

@harmsm
Copy link
Contributor

@harmsm harmsm commented Mar 7, 2026

Pull Request: Replace deprecated numpy.row_stack with numpy.vstack

Description

This PR replaces occurrences of numpy.row_stack with numpy.vstack. As of recent NumPy versions, row_stack is a deprecated alias for vstack. Using row_stack triggers DeprecationWarning.

Changes

The following files were updated to use numpy.vstack:

  • toyplot/coordinates.py: Updated endpoints = numpy.row_stack(((x1, y1), (x2, y2))) to use vstack.
  • toyplot/html.py: Updated p = numpy.row_stack(((x1, y1), (x2, y2))) to use vstack.

Testing

Verified that the DeprecationWarning is resolved and that the code paths continue to function as expected. (There are a few failing behave tests, but they were failing on my machine before the change too).

@coveralls
Copy link

Coverage Status

coverage: 94.119%. remained the same
when pulling 5a53abd on harmsm:main
into f71796a on sandialabs:main.

@tshead2 tshead2 merged commit 615a670 into sandialabs:main Mar 13, 2026
7 of 10 checks passed
@tshead2
Copy link
Member

tshead2 commented Mar 13, 2026

Looks like a winner @harmsm, many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants