MCPcopy Create free account
hub / github.com/cselab/aphros / Get2d

Function Get2d

src/test/sharp/plot.py:35–43  ·  view source on GitHub ↗
(u)

Source from the content-addressed store, hash-verified

33
34# u: numpy array (2d or 3d slice)
35def Get2d(u):
36 if u is None:
37 return None
38 s = u.shape
39 if len(s) == 2:
40 return u
41 else:
42 assert len(s) == 3
43 return u[0,:,:].reshape((s[1], s[2]))
44
45def PlotInit():
46 plt.close()

Callers 1

plot.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected