Skip to content

fix fastplotlib.__init__ #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fastplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .graphics import *
from .graphics.selectors import *
from .legends import *
from .utils import _notebook_print_banner, config

from wgpu.gui.auto import run

Expand All @@ -16,13 +17,15 @@

from wgpu.backends.wgpu_native import enumerate_adapters

with open(Path(__file__).parent.joinpath("VERSION"), "r") as f:
__version__ = f.read().split("\n")[0]

adapters = [a.request_adapter_info() for a in enumerate_adapters()]

if len(adapters) < 1:
raise IndexError("No WGPU adapters found, fastplotlib will not work.")

with open(Path(__file__).parent.joinpath("VERSION"), "r") as f:
__version__ = f.read().split("\n")[0]
_notebook_print_banner()

__all__ = [
"Plot",
Expand Down