Bottom Page

• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
 Scaling elements of marix. pawlo392 Programmer named Tim Posts: 16 Threads: 12 Joined: Mar 2019 Reputation: 0 Likes received: 0 #1 May-16-2019, 10:15 PM (This post was last modified: May-16-2019, 10:15 PM by pawlo392. Edited 1 time in total.) I have a matrix 682x10 and I have problem with one task. I want to do for each j-column Xj=(Xj-min(Xj))/(max(Xj)-min(Xj)). Of course, I know how to do this with for. But I have to use numpy library.I tried it this way: `X[0:] = (X[0:] - np.min(X[0:])) / (np.max(X[0:]) - np.min(X[0:]))`But:``Error:NotImplementedError: subtracting a nonzero scalar from a sparse matrix is not supported`` michalmonday Wafer-Thin Wafer Posts: 93 Threads: 1 Joined: May 2019 Reputation: 13 Likes received: 19 #2 May-16-2019, 11:37 PM Could you show example of input and output that you'd like to achieve using some random 4x2 array? « Next Oldest | Next Newest »

Top Page

 Possibly Related Threads... Thread Author Replies Views Last Post Sum of elements on the list recursive sev 3 220 Jun-20-2019, 02:14 PM Last Post: sev WaveCopy and Amplitude Scaling kgbprod 3 295 Apr-24-2019, 05:49 PM Last Post: kgbprod Recursive Function - Compare 2 lists, return the elements that don't exist in both KellyBaptist 1 410 Dec-23-2018, 10:10 AM Last Post: Gribouillis Printing elements in a tuple with formatting oncebuddy 1 919 Jan-24-2018, 06:25 AM Last Post: Gribouillis Repeating elements when appending in iteration in Python 3.6 miguelsantana 2 905 Dec-17-2017, 01:22 AM Last Post: Terafy reach the elements in the list ptah 7 1,189 Oct-04-2017, 08:12 PM Last Post: ptah join elements from two splits dwiga 2 1,095 Sep-29-2017, 09:27 PM Last Post: nilamo

Forum Jump:

Users browsing this thread: 1 Guest(s)