MCPcopy Index your code
hub / github.com/numpy/numpy / abspath

Method abspath

numpy/lib/_datasource.py:593–614  ·  view source on GitHub ↗

Return absolute path of file in the Repository directory. If `path` is a 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 ---------- pa

(self, path)

Source from the content-addressed store, hash-verified

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

Callers 2

test_ValidHTTPMethod · 0.95
test_sandboxingMethod · 0.95

Calls 2

_fullpathMethod · 0.95
abspathMethod · 0.45

Tested by 2

test_ValidHTTPMethod · 0.76
test_sandboxingMethod · 0.76