MCPcopy Create free account
hub / github.com/numpy/numpy / abspath

Method abspath

numpy/lib/_datasource.py:597–618  ·  view source on GitHub ↗

Return absolute path of file in the Repository directory. If `path` is an URL, then `abspath` will return either the location the file exists locally or the location it would exist when opened using the `open` method. Parameters ---------- p

(self, path)

Source from the content-addressed store, hash-verified

595 return DataSource._findfile(self, self._fullpath(path))
596
597 def abspath(self, path):
598 """
599 Return absolute path of file in the Repository directory.
600
601 If `path` is an URL, then `abspath` will return either the location
602 the file exists locally or the location it would exist when opened
603 using the `open` method.
604
605 Parameters
606 ----------
607 path : str
608 Can be a local file or a remote URL. This may, but does not
609 have to, include the `baseurl` with which the `Repository` was
610 initialized.
611
612 Returns
613 -------
614 out : str
615 Complete path, including the `DataSource` destination directory.
616
617 """
618 return DataSource.abspath(self, self._fullpath(path))
619
620 def exists(self, path):
621 """

Callers

nothing calls this directly

Calls 2

_fullpathMethod · 0.95
abspathMethod · 0.45

Tested by

no test coverage detected