Skip to content

Matplotlib imported by pyGAD #292

Open
@bemgreem

Description

@bemgreem

At the moment from pygad import GA causes matplotlib to be imported. Matplotlib is quite a heavy import that I'd rather avoid if possible when running some code in a limited environment.

Would you consider a conditional import of matplotlib? As in altering pygad so it imports matplotlib at the point of plotting rather than initially. Some other packages such as pandas already use this approach (running import pandas does not import matplotlib but it will be imported at the point df.plot() is called)

I know this is the sort of thing people feel strongly about. If it's palatable I could probably have a look at raising a PR but thought it was worth asking first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions