TypeError Traceback (most recent call last)
Cell In[4], line 3
1 import numpy as np
2 import matplotlib.pyplot as plt
----> 3 plt.style.use('./deeplearning.mplstyle')
File ~\anaconda3\lib\site-packages\matplotlib\style\core.py:153, in use(style)
151 pkg, _, name = style.rpartition(".")
152 try:
--> 153 path = (importlib_resources.files(pkg)
154 / f"{name}.{STYLE_EXTENSION}")
155 style = _rc_params_in_file(path)
156 except (ModuleNotFoundError, IOError) as exc:
157 # There is an ambiguity whether a dotted name refers to a
158 # package.style_name or to a dotted file path. Currently,
(...)
161 # either use Path objects or be prepended with "./" and use
162 # the slash as marker for file paths.
File ~\anaconda3\lib\site-packages\importlib_resources\_common.py:46, in package_to_anchor.<locals>.wrapper(anchor, package)
44 elif anchor is undefined:
45 return func()
---> 46 return func(anchor)
File ~\anaconda3\lib\site-packages\importlib_resources\_common.py:56, in files(anchor)
51 @package_to_anchor
52 def files(anchor: Optional[Anchor] = None) -> Traversable:
53 """
54 Get a Traversable resource for an anchor.
55 """
---> 56 return from_package(resolve(anchor))
File ~\anaconda3\lib\functools.py:888, in singledispatch.<locals>.wrapper(*args, **kw)
884 if not args:
885 raise TypeError(f'{funcname} requires at least '
886 '1 positional argument')
--> 888 return dispatch(args[0].__class__)(*args, **kw)
File ~\anaconda3\lib\site-packages\importlib_resources\_common.py:82, in _(cand)
80 @resolve.register
81 def _(cand: str) -> types.ModuleType:
---> 82 return importlib.import_module(cand)
File ~\anaconda3\lib\importlib\__init__.py:122, in import_module(name, package)
119 if not package:
120 msg = ("the 'package' argument is required to perform a relative "
121 "import for {!r}")
--> 122 raise TypeError(msg.format(name))
123 for character in name:
124 if character != '.':
TypeError: the 'package' argument is required to perform a relative import for './deeplearning'