MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / SetSlice

Function SetSlice

python/__expr.py:170–178  ·  view source on GitHub ↗
(self, index, other)

Source from the content-addressed store, hash-verified

168 return self.Range(index[0], index[1])
169
170def SetSlice(self, index, other):
171 if not isinstance(index,slice):
172 self.Set(index, other)
173 return
174 index = index.indices(len(self))
175 if(index[2]!=1):
176 print("Slicing with 3 parameters not supported!")
177 return none
178 Expr(other).AssignTo(self.Range(index[0], index[1]).expr)
179
180
181

Callers

nothing calls this directly

Calls 4

ExprFunction · 0.70
SetMethod · 0.45
AssignToMethod · 0.45
RangeMethod · 0.45

Tested by

no test coverage detected