Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
numpy_exercises [2020/10/17 19:28] – prasanthi | numpy_exercises [2020/10/25 04:39] (current) – prasanthi |
---|
2 | 2 |
</code> | </code> |
You can also get the same result by doing np.vstack((c1, c2)).T . But I like the column_stack() approach as it gives the correct shape right away and does not require a transpose. | You can also get the same result by doing <nowiki>np.vstack((c1, c2)).T</nowiki> . But I like the column_stack() approach as it gives the correct shape right away and does not require a transpose. |
| |
<code> | <code> |
True | True |
</code> | </code> |
| |
| Ref:- |
| * https://openlibrary.org/books/OL26834151M/Python_for_Data_Analysis_Data_Wrangling_with_Pandas_NumPy_and_IPython -> Appendix A "Advanced Numpy" -> "A.2 Advanced Array Manipulation" -> "Concatenating and Splitting Arrays" -> "Table A-1. Array concatenation functions" - contains a list of similar functions and their description. |
| * https://numpy.org/doc/stable/reference/generated/numpy.array_equal.html - np.array_equal() can be used to check if two arrays are equal |
| * https://stackoverflow.com/questions/17710672/create-2-dimensional-array-with-2-one-dimensional-array |
| |
| tags | combine two numpy arrays into 2d array |
| |