diff options
| author | Christian Kolset <christian.kolset@gmail.com> | 2025-04-29 18:38:21 -0600 |
|---|---|---|
| committer | Christian Kolset <christian.kolset@gmail.com> | 2025-04-29 18:38:21 -0600 |
| commit | dc13208abd61cc3ac7c64a4373f3ad85689f1293 (patch) | |
| tree | b8775c75daefe5c5f183b7fbb561b6d18e82f0d3 /tutorials/module_1/array.md | |
| parent | ce478a33e25759b901d401609175713a5ded3522 (diff) | |
Finished of module 1 tutorials (.md) and added documentation to module 2
Diffstat (limited to 'tutorials/module_1/array.md')
| -rw-r--r-- | tutorials/module_1/array.md | 8 |
1 files changed, 2 insertions, 6 deletions
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) - + 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 |
