File: import.py

package info (click to toggle)
python-xarray 2025.08.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,796 kB
  • sloc: python: 115,416; makefile: 258; sh: 47
file content (18 lines) | stat: -rw-r--r-- 500 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Import:
    """Benchmark importing xarray"""

    def timeraw_import_xarray(self):
        return "import xarray"

    def timeraw_import_xarray_plot(self):
        return "import xarray.plot"

    def timeraw_import_xarray_backends(self):
        return """
        from xarray.backends import list_engines
        list_engines()
        """

    def timeraw_import_xarray_only(self):
        # import numpy and pandas in the setup stage
        return "import xarray", "import numpy, pandas"