Skip to content

pyvista _Brain init too stringent about size parameter #7426

Closed

Description

@drammock

I'm hitting the error '"size" parameter must be int or tuple.' I'm generating lots of similar figures, so I store several project-level parameters (including brain plotting kwargs like figure size) in an external YAML file, and pyYAML's "safe loader" doesn't support tuples, only lists. Instead of checking isinstance(size, tuple) maybe we could check if it is length-2, and then convert it to tuple? Or do it however the mayavi code did it; it works to pass size=[1200, 1200] with the mayavi backend.

@GuillaumeFavelier since you're the PyVista master I wanted to run this by you before just making the change... but I'm happy to do it myself if you're OK with it and you're too busy.

Activity

  1. GuillaumeFavelier commented on Mar 12, 2020

    @GuillaumeFavelier
    Contributor

    Good catch @drammock, even just for compatibility with mayavi I think list should be supported. Feel free to take care of it if you want 👍

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions