faces¶
- faces(shape, inlet: int = None, outlet: int = None)[source]¶
Generate an image with
True
values on the specifiedinlet
andoutlet
faces- Parameters:
shape (list) – The
[x, y, z (optional)]
shape to generate. This will likely be obtained fromim.shape
whereim
is the image for which an array of faces is required.inlet (int) – The axis where the faces should be added (e.g.
inlet=0
will putTrue
values on thex=0
face). A value ofNone
bypasses the addition of inlets.outlet (int) – Same as
inlet
except for the outlet face. This is optional. It can be be applied at the same time asinlet
, instead ofinlet
(ifinlet
is set toNone
), or ignored (ifoutlet = None
).
- Returns:
faces – A boolean image of the given
shape
withTrue
values on the specifiedinlet
and/oroutlet
face(s).- Return type:
ndarray
Examples
Click here to view online example.