-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
KevinYuann edited this page Nov 17, 2022
·
12 revisions
- set up environement as in readme
- click run
- see plots
- play with variables
If you want to draw plots in higher dimensions than 2D, here's how. The hypercast()
function is built exactly for this purpose.
Code snippet:
from architect.libs.utillib import hypercast
x = np.arange(start=0, stop=10, step=1)
y = np.arange(start=0, stop=20, step=1)
x_hyper, y_hyper = hypercast(a, b)
z = some_function(a, b)
What's happening under the hood is that the function is converting the input of multiple 1D arrays into multiple hypercubes that can be described by an n-dimensional array.
The most important feature to note that is that all of these hypercubes will be of the shape size-wise, allowing us to easily use them in functions. Another feature that is important to mention is that the orientation of the array will depend on the order in which the 1D arrays are passed into the function.