Skip to content

pyvista _Brain init too stringent about size parameter #7426

@drammock

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.

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