-
Notifications
You must be signed in to change notification settings - Fork 0
Added changes #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added changes #18
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,83 @@ | ||||||
| # Author: OMKAR PATHAK | ||||||
|
|
||||||
| # NumPy (Numeric Python) is a Python package used for building multi dimensional arrays and performing | ||||||
| # various operations | ||||||
|
|
||||||
| # In this program we will walk through various concepts and see available functions in the NumPy package. | ||||||
|
|
||||||
| # For installing: pip3 install numpy | ||||||
|
|
||||||
| import numpy as np | ||||||
|
|
||||||
| # we have a function arange() which makes an array of the specified dimension. Example: | ||||||
| myArray = np.arange(20) | ||||||
| print(myArray) # [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19] | ||||||
|
|
||||||
| # an array from 10 to 20 | ||||||
| myArray = np.arange(10, 20) # [10 11 12 13 14 15 16 17 18 19] | ||||||
| print(myArray) | ||||||
|
|
||||||
| # an array from 10 to 20 with 2 steps | ||||||
| myArray = np.arange(10, 20, 2) | ||||||
| print(myArray) # [10 12 14 16 18] | ||||||
|
|
||||||
| # reshape() helps to reshape our NumPy array | ||||||
| myArray = np.arange(20) | ||||||
| # syntax: reshape(number_of_rows, number_of_columns) | ||||||
| myArray = myArray.reshape(4, 5) | ||||||
| print(myArray) | ||||||
|
|
||||||
| # [[ 0 1 2 3 4] | ||||||
| # [ 5 6 7 8 9] | ||||||
| # [10 11 12 13 14] | ||||||
| # [15 16 17 18 19]] | ||||||
|
|
||||||
| myArray = myArray.reshape(10, 2) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential Incompatible Reshape Operation I noticed that we are reshaping
Suggested change
Reasons & GapsReasons
Gaps
|
||||||
| print(myArray) | ||||||
|
|
||||||
| # [[ 0 1] | ||||||
| # [ 2 3] | ||||||
| # [ 4 5] | ||||||
| # [ 6 7] | ||||||
| # [ 8 9] | ||||||
| # [10 11] | ||||||
| # [12 13] | ||||||
| # [14 15] | ||||||
| # [16 17] | ||||||
| # [18 19]] | ||||||
|
|
||||||
| # shape returns the shape of the array. The length of shape tuple is called as rank (or dimension) | ||||||
| print(myArray.shape) # (10, 2) | ||||||
|
|
||||||
| # ndim returns the dimension (rank) of the array | ||||||
| print(myArray.ndim) # 2 | ||||||
|
|
||||||
| # size returns the total number of elements in the array | ||||||
| print(myArray.size) # 20 | ||||||
|
|
||||||
| # to check the data we have dtype. | ||||||
| print(myArray.dtype) # int64 | ||||||
|
|
||||||
| # zeros creates an array will all zeros | ||||||
| myArray = np.zeros((3, 4)) | ||||||
| print(myArray) | ||||||
|
|
||||||
| # [[ 0. 0. 0. 0.] | ||||||
| # [ 0. 0. 0. 0.] | ||||||
| # [ 0. 0. 0. 0.]] | ||||||
|
|
||||||
| # ones creates an array with all ones | ||||||
| myArray = np.ones((3, 4)) | ||||||
| print(myArray) | ||||||
|
|
||||||
| # [[ 1. 1. 1. 1.] | ||||||
| # [ 1. 1. 1. 1.] | ||||||
| # [ 1. 1. 1. 1.]] | ||||||
|
|
||||||
| # numpy random module helps to initialize array with random values | ||||||
| myArray = np.random.rand(3, 4) | ||||||
| print(myArray) | ||||||
|
|
||||||
| # [[ 0.54808903 0.08750717 0.23886267 0.93589283] | ||||||
| # [ 0.90750146 0.31197039 0.54013725 0.91092763] | ||||||
| # [ 0.38827674 0.04647878 0.15997665 0.94909537]] | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,34 @@ | ||||||
| # Author: OMKAR PATHAK | ||||||
|
|
||||||
| # Data type Description | ||||||
| # bool_ Boolean (True or False) stored as a byte | ||||||
| # int_ Default integer type (same as C long; normally either int64 or int32) | ||||||
| # intc Identical to C int (normally int32 or int64) | ||||||
| # intp Integer used for indexing (same as C ssize_t; normally either int32 or int64) | ||||||
| # int8 Byte (-128 to 127) | ||||||
| # int16 Integer (-32768 to 32767) | ||||||
| # int32 Integer (-2147483648 to 2147483647) | ||||||
| # int64 Integer (-9223372036854775808 to 9223372036854775807) | ||||||
| # uint8 Unsigned integer (0 to 255) | ||||||
| # uint16 Unsigned integer (0 to 65535) | ||||||
| # uint32 Unsigned integer (0 to 4294967295) | ||||||
| # uint64 Unsigned integer (0 to 18446744073709551615) | ||||||
| # float_ Shorthand for float64. | ||||||
| # float16 Half precision float: sign bit, 5 bits exponent, 10 bits mantissa | ||||||
| # float32 Single precision float: sign bit, 8 bits exponent, 23 bits mantissa | ||||||
| # float64 Double precision float: sign bit, 11 bits exponent, 52 bits mantissa | ||||||
| # complex_ Shorthand for complex128. | ||||||
| # complex64 Complex number, represented by two 32-bit floats (real and imaginary components) | ||||||
| # complex128 Complex number, represented by two 64-bit floats (real and imaginary components) | ||||||
|
|
||||||
| import numpy as np | ||||||
|
|
||||||
| # while creating a numpy array, any data type from above can be explicitly specified. | ||||||
| myArray = np.arange(10) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Non-Descriptive Variable Name The variable name 'myArray' uses a generic term and camelCase, which is non-standard for Python. A more descriptive snake_case name like 'numbers_array' or 'sequence_array' would improve clarity.
Suggested change
|
||||||
| print(myArray) # [0 1 2 3 4 5 6 7 8 9] | ||||||
|
|
||||||
| myArray = np.array(myArray, dtype = np.float32) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inefficient Array Re-creation for Type Casting JAS - Just a suggestion
Suggested change
|
||||||
| print(myArray) # [ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9.] | ||||||
|
|
||||||
| myArray = np.array(myArray, dtype = np.complex64) | ||||||
| print(myArray) # [ 0.+0.j 1.+0.j 2.+0.j 3.+0.j 4.+0.j 5.+0.j 6.+0.j 7.+0.j 8.+0.j 9.+0.j] | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,24 @@ | ||||||
| # Author: OMKAR PATHAK | ||||||
|
|
||||||
| # These are the various attributes provided by NumPy. | ||||||
|
|
||||||
| import numpy as np | ||||||
|
|
||||||
| myArray = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Variable Naming Improvement The variable name 'myArray' uses a generic 'my' prefix and camelCase, which is non-standard for Python. Renaming it to 'matrix' or 'data_array' in snake_case would improve clarity and consistency.
Suggested change
|
||||||
| print(myArray) | ||||||
|
|
||||||
| # [[1 2 3] | ||||||
| # [4 5 6] | ||||||
| # [7 8 9]] | ||||||
|
|
||||||
| # ndarray.size returns the number of items in the array | ||||||
| print(myArray.size) # 9 | ||||||
|
|
||||||
| # ndarray.shape returns a tuple consisting of array dimensions | ||||||
| print(myArray.shape) # (3, 3) | ||||||
|
|
||||||
| # ndarray.ndim returns the number of array dimensions | ||||||
| print(myArray.ndim) # 2 | ||||||
|
|
||||||
| # ndarray.itemsize returns the memory size of each element in the array | ||||||
| print(myArray.itemsize) # 8 | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||
| # Author: OMKAR PATHAK | ||||||
|
|
||||||
| # This program illustrates how to create an adarray from numerical ranges | ||||||
|
|
||||||
| import numpy as np | ||||||
|
|
||||||
| # ndarray.arange(start, stop, step, dtype) | ||||||
| # Creates a numpy array from 1 to 20 | ||||||
| myArray = np.arange(1, 21) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Variable Naming Improvement The variable name 'myArray' uses a generic prefix and camelCase, which is non-standard for Python. Renaming it to something more descriptive like 'numerical_range_array' improves clarity.
Suggested change
|
||||||
| print(myArray) # [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] | ||||||
|
|
||||||
| # Specifying data type of each element | ||||||
| myArray = np.arange(10, dtype = 'float') | ||||||
| print(myArray) # [ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9.] | ||||||
|
|
||||||
| # Specifying steps to jump in between two elements | ||||||
| myArray = np.arange(1, 21, 2) | ||||||
| print(myArray) # [ 1 3 5 7 9 11 13 15 17 19] | ||||||
|
|
||||||
| # ndarray.linspace(start, stop, num, endpoint, retstep, dtype) | ||||||
| # Shows 5 equal intervals between 10 to 20 | ||||||
| myArray = np.linspace(10, 20, 5) | ||||||
| print(myArray) # [ 10. 12.5 15. 17.5 20. ] | ||||||
|
|
||||||
| # if endpoint is set to false the last number inn STOP parameter is not executed | ||||||
| myArray = np.linspace(10, 20, 5, endpoint = False) | ||||||
| print(myArray) # [ 10. 12. 14. 16. 18.] | ||||||
|
|
||||||
| # ndarray.lopspace returns an ndarray object that contains the numbers that are evenly spaced | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo in Function Name Comment JAS - Just a suggestion
Suggested change
|
||||||
| # on a log scale. | ||||||
| # ndarray.logscale(start, stop, num, endpoint, base, dtype) | ||||||
| # default base is 10 | ||||||
| myArray = np.logspace(1.0, 3.0, num = 10) | ||||||
| print(myArray) | ||||||
|
|
||||||
| # [ 10. 16.68100537 27.82559402 46.41588834 77.42636827 | ||||||
| # 129.1549665 215.443469 359.38136638 599.48425032 1000. ] | ||||||
|
|
||||||
| myArray = np.logspace(1.0, 3.0, num = 10, base = 2) | ||||||
| print(myArray) | ||||||
|
|
||||||
| # [ 2. 2.33305808 2.72158 3.1748021 3.70349885 4.32023896 | ||||||
| # 5.0396842 5.87893797 6.85795186 8. ] | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,83 @@ | ||||||
| # Author: OMKAR PATHAK | ||||||
|
|
||||||
| # This example shows various array manipulation operations | ||||||
| import numpy as np | ||||||
|
|
||||||
| # numpy.reshape(array_to_reshape, tuple_of_new_shape) gives new shape (dimension) to our array | ||||||
| myArray = np.arange(0, 30, 2) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Variable Naming Improvement The variable name 'myArray' uses a generic 'my' prefix which adds no semantic value. Renaming it to 'even_numbers_sequence' or 'sequence_array' would better describe the data it contains.
Suggested change
|
||||||
| print(myArray) # [ 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28] | ||||||
|
|
||||||
| myArrayReshaped = myArray.reshape(5, 3) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Variable Naming Improvement The name 'myArrayReshaped' contains the redundant prefix 'my' and describes the operation rather than the data. A name like 'reshaped_matrix' or 'grid_data' would be more descriptive.
Suggested change
|
||||||
| print(myArrayReshaped) | ||||||
|
|
||||||
| # [[ 0 2 4] | ||||||
| # [ 6 8 10] | ||||||
| # [12 14 16] | ||||||
| # [18 20 22] | ||||||
| # [24 26 28]] | ||||||
|
|
||||||
| # numpy.ndarray.flat() returns an 1-D iterator | ||||||
| print(myArray.flat[5]) # 10 | ||||||
|
|
||||||
| # numpy.ndarray.flatten() restores the reshaped array into a 1-D array | ||||||
| print(myArrayReshaped.flatten()) | ||||||
|
|
||||||
| # numpy.tranpose() this helps to find the tranpose of the given array | ||||||
| print(myArrayReshaped.transpose()) | ||||||
|
|
||||||
| # [[ 0 6 12 18 24] | ||||||
| # [ 2 8 14 20 26] | ||||||
| # [ 4 10 16 22 28]] | ||||||
|
|
||||||
| # numpy.swapaxes(array, axis1, axis2) interchanges the two axes of an array | ||||||
| originalArray = np.arange(8).reshape(2,2,2) | ||||||
| print(originalArray) | ||||||
|
|
||||||
| # [[[0 1] | ||||||
| # [2 3]] | ||||||
| # | ||||||
| # [[4 5] | ||||||
| # [6 7]]] | ||||||
|
|
||||||
| print(np.swapaxes(originalArray, 2, 0)) | ||||||
|
|
||||||
| # [[[0 4] | ||||||
| # [2 6]] | ||||||
| # | ||||||
| # [[1 5] | ||||||
| # [3 7]]] | ||||||
|
|
||||||
| # numpy.rollaxis(arr, axis, start) rolls the specified axis backwards, until it lies in a specified position | ||||||
| print(np.rollaxis(originalArray, 2)) | ||||||
|
|
||||||
| # [[[0 2] | ||||||
| # [4 6]] | ||||||
| # | ||||||
| # [[1 3] | ||||||
| # [5 7]]] | ||||||
|
|
||||||
| # numpy.resize(arr, shape) returns a new array with the specified size. If the new size is greater than | ||||||
| # the original, the repeated copies of entries in the original are contained | ||||||
|
|
||||||
| myArray = np.array([[1,2,3],[4,5,6]]) | ||||||
| print(myArray) | ||||||
|
|
||||||
| # [[1 2 3] | ||||||
| # [4 5 6]] | ||||||
|
|
||||||
| print(np.resize(myArray, (3, 2))) | ||||||
|
|
||||||
| # [[1 2] | ||||||
| # [3 4] | ||||||
| # [5 6]] | ||||||
|
|
||||||
| # numpy.append(array, values, axis) | ||||||
| myArray = np.array([[1,2,3],[4,5,6]]) | ||||||
| print(myArray) | ||||||
|
|
||||||
| # [[1 2 3] | ||||||
| # [4 5 6]] | ||||||
|
|
||||||
| print(np.append(myArray, [7, 8, 9])) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent Axis Handling in np.append JAS - Just a suggestion
Suggested change
|
||||||
|
|
||||||
| # [1 2 3 4 5 6 7 8 9] | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,43 @@ | ||||||
| # Author: OMKAR PATHAK | ||||||
|
|
||||||
| import numpy as np | ||||||
|
|
||||||
| abc = ['abc'] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Single-Character Variable Name The variable name 'abc' is non-descriptive. While it contains multiple letters, it acts as a placeholder. Using a name like 'string_array_one' or 'first_word_list' would better communicate the variable's purpose.
Suggested change
|
||||||
| xyz = ['xyz'] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Non-Descriptive Variable Name The variable name 'xyz' is a generic placeholder. Replacing it with a more descriptive name like 'second_word_list' or 'suffix_array' would improve the readability of the string operations.
Suggested change
|
||||||
|
|
||||||
| # string concatenation | ||||||
| print(np.char.add(abc, xyz)) # ['abcxyz'] | ||||||
|
|
||||||
| print(np.char.add(abc, 'pqr')) # ['abcpqr'] | ||||||
|
|
||||||
| # string multiplication | ||||||
| print(np.char.multiply(abc, 3)) # ['abcabcabc'] | ||||||
|
|
||||||
| # numpy.char.center: This function returns an array of the required width so that the input string is | ||||||
| # centered and padded on the left and right with fillchar. | ||||||
|
|
||||||
| print(np.char.center(abc, 20, fillchar = '*')) # ['********abc*********'] | ||||||
|
|
||||||
| # numpy.char.capitalize(): This function returns the copy of the string with the first letter capitalized. | ||||||
| print(np.char.capitalize('hello world')) # Hello world | ||||||
|
|
||||||
| # numpy.char.title(): This function returns a title cased version of the input string with the first letter | ||||||
| # of each word capitalized. | ||||||
| print(np.char.title('hello how are you?')) # Hello How Are You? | ||||||
|
|
||||||
| # numpy.char.lower(): This function returns an array with elements converted to lowercase. It calls | ||||||
| # str.lower for each element. | ||||||
| print(np.char.lower(['HELLO','WORLD'])) # ['hello' 'world'] | ||||||
|
|
||||||
| # numpy.char.upper(): This function calls str.upper function on each element in an array to return | ||||||
| # the uppercase array elements. | ||||||
| print(np.char.upper('hello')) # HELLO | ||||||
|
|
||||||
| # numpy.char.split(): This function returns a list of words in the input string. By default, a whitespace | ||||||
| # is used as a separator | ||||||
| print(np.char.split('Omkar Pathak')) # ['Omkar', 'Pathak'] | ||||||
| print(np.char.split('2017-02-11', sep='-')) # ['2017', '02', '11'] | ||||||
|
|
||||||
| # numpy.char.join(): This method returns a string in which the individual characters are joined by | ||||||
| # separator character specified. | ||||||
| print(np.char.join(':','dmy')) # d:m:y | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incorrect Argument Order in np.char.join JAS - Just a suggestion
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||
| # Author: OMKAR PATHAK | ||||||
|
|
||||||
| import numpy as np | ||||||
|
|
||||||
| angles = np.array([0, 30, 45, 60, 90, 180, 360]) | ||||||
|
|
||||||
| # Convert to radians by multiplying with pi/180 | ||||||
| # for getting sine of angles | ||||||
| print(np.sin(angles * np.pi/180)) | ||||||
|
|
||||||
| # for getting cosine of angles | ||||||
| print(np.cos(angles * np.pi/180)) | ||||||
|
|
||||||
| # for getting tangent of angles | ||||||
| print(np.tan(angles * np.pi/180)) | ||||||
|
|
||||||
| # for computing inverse of trigonometric functions | ||||||
| sine = np.sin(angles * np.pi/180) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Single-Character Variable Name The variable name 'sine' is partially descriptive but 'sine_values' would better represent the array of results. However, 'sine' itself is a common mathematical term and is acceptable in this context.
Suggested change
|
||||||
| sineinv = np.arcsin(sine) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inaccurate Inverse Trigonometry Logic I notice we're calculating the inverse sine of a range that includes 360 degrees. Since Reasons & GapsReasons
Gaps
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JAS - Just a suggestion Cryptic Abbreviation in Variable Name The variable name 'sineinv' uses a cryptic abbreviation 'inv'. Expanding this to 'inverse_sine' or 'sine_inverse' would significantly improve readability and follow standard naming conventions.
Suggested change
|
||||||
| # computing angle from inverse | ||||||
| print(np.degrees(sineinv)) | ||||||
|
|
||||||
| # for rounding the values | ||||||
| print(np.around(sine, 4)) # [ 0. 0.5 0.7071 0.866 1. 0. -0. ] | ||||||
|
|
||||||
| # for rounding to previous integer | ||||||
| print(np.floor(sine)) # [ 0. 0. 0. 0. 1. 0. -1.] | ||||||
|
|
||||||
| # for rounding to next integer | ||||||
| print(np.ceil(sine)) # [ 0. 1. 1. 1. 1. 1. -0.] | ||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,25 @@ | ||||||
| # Author: OMKAR PATHAK | ||||||
|
|
||||||
| import numpy as np | ||||||
|
|
||||||
| firstArray = np.arange(12).reshape(3, 4) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| print(firstArray) | ||||||
|
|
||||||
| secondArray = np.arange(4) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| print(secondArray) | ||||||
|
|
||||||
| # adding above two arrays (NOTE: array shapes should be same) | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Incompatible Array Shapes for Arithmetic JAS - Just a suggestion
Suggested change
|
||||||
| print(np.add(firstArray, secondArray)) | ||||||
|
|
||||||
| # subtracting above two arrays | ||||||
| print(np.subtract(firstArray, secondArray)) | ||||||
|
|
||||||
| # multiplying above two arrays | ||||||
| print(np.multiply(firstArray, secondArray)) | ||||||
|
|
||||||
| # dividing the above two arrays | ||||||
| print(np.divide(firstArray, secondArray)) | ||||||
|
|
||||||
| # numpy.power(): returns array element raised to the specified value result | ||||||
| array = np.array([1, 2, 3]) | ||||||
| print(np.power(array, 2)) # [1 4 9] | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JAS - Just a suggestion
Non-Standard Variable Abbreviation
The variable name 'myArray' uses a generic term 'Array'. While functional, it is better to use a more descriptive name like 'numbers_array' or 'sequence_array' to reflect the data it holds.