ErrorException Message: Argument 2 passed to WP_Translation_Controller::load_file() must be of the type string, null given, called in /homepages/23/d949784577/htdocs/clickandbuilds/Neuralnetlab/wp-includes/l10n.php on line 838
https://neuralnetlab.com/wp-content/plugins/dmca-badge/libraries/sidecar/classes/{"id":328,"date":"2021-08-21T17:02:57","date_gmt":"2021-08-21T17:02:57","guid":{"rendered":"https:\/\/neuralnetlab.com\/?p=328"},"modified":"2022-02-08T17:20:18","modified_gmt":"2022-02-08T17:20:18","slug":"numpy-sort-for-machine-learning","status":"publish","type":"post","link":"https:\/\/neuralnetlab.com\/numpy-sort-for-machine-learning\/","title":{"rendered":"Numpy Sort for Machine Learning"},"content":{"rendered":"\n
Numpy helps your machine learning python code by adding the power and flexibility of arrays and matrices to it. Hence, there are times when you need to sort those arrays to suit your algorithm. For such occasions, we use NumPy sort function, written below.<\/p>\n\n\n\n
This function returns a sorted copy of your original array. Now let’s take a look at the function in detail starting from creating a numpy array.<\/p>\n\n\n\n I’m creating an array called nnl_array, nnl <\/strong>standards for neural network lab<\/strong>. (In case if you are wondering why I’m using nnl <\/strong>naming convention in a lot of tutorials.. \ud83d\ude42 ) Let us create our two-dimensional array so we can learn how this function actually works.<\/p>\n\n\n\n Let’s print this array out.<\/p>\n\n\n\n The Result:<\/strong><\/p>\n\n\n\nnumpy.sort()<\/code><\/p>\n\n\n\n
Create a numpy array to test numpy sort function<\/h2>\n\n\n\n
nnl_array = np.array([[1,5,3], [6,5,7]])<\/code><\/pre>\n\n\n\n
print (\"original array\", \"\\n\", nnl_array)<\/code><\/pre>\n\n\n\n