MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / __getitem__

Method __getitem__

site-packages/numpy/core/defchararray.py:2007–2017  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

2005 raise ValueError("Can only create a chararray from string data.")
2006
2007 def __getitem__(self, obj):
2008 val = ndarray.__getitem__(self, obj)
2009
2010 if isinstance(val, character):
2011 temp = val.rstrip()
2012 if _len(temp) == 0:
2013 val = ''
2014 else:
2015 val = temp
2016
2017 return val
2018
2019 # IMPLEMENTATION NOTE: Most of the methods of this class are
2020 # direct delegations to the free functions in this module.

Callers

nothing calls this directly

Calls 1

rstripMethod · 0.45

Tested by

no test coverage detected