MCPcopy
hub / github.com/quantopian/zipline / endswith

Method endswith

zipline/lib/labelarray.py:745–759  ·  view source on GitHub ↗

Elementwise endswith. Parameters ---------- suffix : str Returns ------- matches : np.ndarray[bool] An array with the same shape as self indicating whether each element of self ended with ``suffix``

(self, suffix)

Source from the content-addressed store, hash-verified

743 return self.map_predicate(lambda elem: elem.startswith(prefix))
744
745 def endswith(self, suffix):
746 """
747 Elementwise endswith.
748
749 Parameters
750 ----------
751 suffix : str
752
753 Returns
754 -------
755 matches : np.ndarray[bool]
756 An array with the same shape as self indicating whether each
757 element of self ended with ``suffix``
758 """
759 return self.map_predicate(lambda elem: elem.endswith(suffix))
760
761 def has_substring(self, substring):
762 """

Callers 7

test_compare_to_strMethod · 0.95
git_pieces_from_vcsFunction · 0.45
do_vcs_installFunction · 0.45
git_pieces_from_vcsFunction · 0.45
load_extensionsFunction · 0.45
load_example_modulesFunction · 0.45

Calls 1

map_predicateMethod · 0.95

Tested by 2

test_compare_to_strMethod · 0.76