minor documentation improvements
parent
3694c2f034
commit
27a17f3bf7
|
@ -673,7 +673,7 @@ under certain conditions; type `show c' for details.
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
}
|
}
|
||||||
|
|
||||||
The hypothetical commands {\tt show w} and {\tt show c} should show
|
The hypothetical commands \texttt{show w} and \texttt{show c} should show
|
||||||
the appropriate
|
the appropriate
|
||||||
parts of the General Public License. Of course, your program's commands
|
parts of the General Public License. Of course, your program's commands
|
||||||
might be different; for a GUI interface, you would use an ``about box''.
|
might be different; for a GUI interface, you would use an ``about box''.
|
||||||
|
|
|
@ -999,10 +999,11 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
|
|
||||||
\subsubsection{Mitsuba interaction with NumPy}
|
\subsubsection{Mitsuba interaction with NumPy}
|
||||||
Suppose that \code{bitmap} contains a \code{mitsuba.core.Bitmap} instance (e.g. a rendering). Then the following snippet efficiently turns the image into a NumPy array:
|
Suppose that \code{bitmap} contains a \code{mitsuba.core.Bitmap} instance (e.g. a rendering). Then the following snippet efficiently turns the image into a NumPy array (and back):
|
||||||
\begin{python}
|
\begin{python}
|
||||||
import numpy as np
|
import numpy as np
|
||||||
array = np.array(bitmap.buffer())
|
array = np.array(bitmap.buffer())
|
||||||
|
bitmap = Bitmap(array)
|
||||||
\end{python}
|
\end{python}
|
||||||
The next snippet shows how to extract an individual image
|
The next snippet shows how to extract an individual image
|
||||||
from the channels of a larger multi-channel EXR image (e.g. channels named \code{albedo.r}, \code{albedo.g}, \code{albedo.b})
|
from the channels of a larger multi-channel EXR image (e.g. channels named \code{albedo.r}, \code{albedo.g}, \code{albedo.b})
|
||||||
|
|
Loading…
Reference in New Issue