From dc13208abd61cc3ac7c64a4373f3ad85689f1293 Mon Sep 17 00:00:00 2001 From: Christian Kolset Date: Tue, 29 Apr 2025 18:38:21 -0600 Subject: Finished of module 1 tutorials (.md) and added documentation to module 2 --- tutorials/module_1/array.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tutorials/module_1/array.md') diff --git a/tutorials/module_1/array.md b/tutorials/module_1/array.md index 3c0290e..9fa1c88 100644 --- a/tutorials/module_1/array.md +++ b/tutorials/module_1/array.md @@ -15,7 +15,7 @@ A two-dimensional array would be like a table: A three-dimensional array would be like a set of tables, perhaps stacked as though they were printed on separate pages. If we visualize the position of each element as a position in space. Then we can represent the value of the element as a property. In other words, if we were to analyze the stress concentration of an aluminum block, the property would be stress. - From [Numpy documentation](https://numpy.org/doc/2.2/user/absolute_beginners.html) -![Mathworks 3-D array](figures/multi-dimensional-array.gif) +![Mathworks 3-D array](figures/multi-dimensional-array.png) If the load on this block changes over time, then we may want to add a 4th dimension i.e. additional sets of 3-D arrays for each time increment. As you can see - the more dimensions we add, the more complicated of a problem we have to solve. It is possible to increase the number of dimensions to the n-th order. This course we will not be going beyond dimensional analysis. @@ -96,7 +96,7 @@ Here's an example of data from a rocket test stand where thrust was recorded as ```python thrust_lbf = np.array(0.603355, 2.019083, 2.808092, 4.054973, 1.136618, 0.943668) ->>> thrust_lbs[3] +print(thrust_lbs[3]) ``` Due to the nature of zero-based indexing. If we want to call the value `4.054973` that will be the 3rd index. @@ -110,10 +110,6 @@ Due to the nature of zero-based indexing. If we want to call the value `4.054973 - `np.mean()`, `np.median()`, `np.std()`, `np.var()` - `np.min()`, `np.max()`, `np.argmin()`, `np.argmax()` - Summation along axes: `np.sum(arr, axis=0)` -##### Combining arrays -- Concatenation: `np.concatenate((arr1, arr2), axis=0)` -- Stacking: `np.vstack()`, `np.hstack()` -- Splitting: `np.split()` ## Exercise Let's solve a statics problem given the following problem -- cgit v1.2.3