Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: comparing each rows of two matrix
Post: RE: comparing each rows of two matrix

The only idea I have: Transforming the matrices into two lists, and a nested for cycle... a_lista=a.tolist() b_lista=b.tolist() #"a" and "b" were my previously defined np.matrices for i in range(4): ...
PhysChem Data Science 10 6,037 May-16-2019, 09:47 AM
    Thread: comparing each rows of two matrix
Post: RE: comparing each rows of two matrix

Hi, after a long pause, I started to play with Python again. I have a question: How can I print which row-vektors were identical, if I am using solution given by Gribouillis? (I want to print the ord...
PhysChem Data Science 10 6,037 May-14-2019, 09:22 AM
    Thread: comparing each rows of two matrix
Post: RE: comparing each rows of two matrix

Hi all! Thank you for the solutions. I applied the Counter-code, because the matrices have lots of rows (much more than in my question).
PhysChem Data Science 10 6,037 Apr-21-2019, 03:13 PM
    Thread: comparing each rows of two matrix
Post: RE: comparing each rows of two matrix

Thank you for the answers!
PhysChem Data Science 10 6,037 Apr-18-2019, 12:03 PM
    Thread: comparing each rows of two matrix
Post: comparing each rows of two matrix

I have two numpy-matrices ("A" and "B"). I want to compare every row-vector in "A" matrix with every row-vector in "B" matrix. Here is my (not working) code. The expected output is 5. import numpy ...
PhysChem Data Science 10 6,037 Apr-18-2019, 06:17 AM
    Thread: "erlarge" a numpy-matrix to numpy-array
Post: RE: "erlarge" a numpy-matrix to numpy-array

Thank you! This is exactly, what I want.
PhysChem Data Science 2 2,998 Apr-09-2019, 04:54 PM
    Thread: "erlarge" a numpy-matrix to numpy-array
Post: "erlarge" a numpy-matrix to numpy-array

Hi all! Is there a way to concatenate/append/"gluetogether" two (n*m-shaped) matrix into a single (n*m*2-shaped) array (with 3 axle), and not into an other (2n*m-shaped) or (n*2m-shaped) matrix? I ...
PhysChem Data Science 2 2,998 Apr-08-2019, 05:02 PM
    Thread: counting the occurence of a specified number in a numpy-matrix
Post: RE: counting the occurence of a specified number i...

Oké, it seems, i have a solution. The newer versions of the Spyder IDE support the copy paste.
PhysChem Data Science 1 2,411 Apr-03-2019, 01:37 PM
    Thread: counting the occurence of a specified number in a numpy-matrix
Post: counting the occurence of a specified number in a ...

Hi! There is a numpy-matrix with a couple column and about 100000 row. For now, only the last element of each row is important. I wish to count, that how many row has the number 1 as the last element...
PhysChem Data Science 1 2,411 Apr-03-2019, 06:27 AM
    Thread: Diffusion simulation. Works, but how to make it fast
Post: RE: Diffusion simulation. Works, but how to make i...

I solved it :-) The old code worked the following way: 1.step) the python read the first row of the k-matrix (which contains the coordinates), 2.step) then -according to the last coordinate- it decid...
PhysChem Data Science 2 2,814 Oct-12-2018, 05:12 PM
    Thread: Diffusion simulation. Works, but how to make it fast
Post: Diffusion simulation. Works, but how to make it fa...

Hi all! I wrote a -primitive- diffusion simulator, although it works there is one problem: It is damn slow. (30000 diffusion-step took almost a day **huh** ) How it's look like: There is a 1000...
PhysChem Data Science 2 2,814 Oct-10-2018, 07:20 PM
    Thread: random matrix, with some special feature
Post: RE: random matrix, with some special feature

You are right! I wrote the 3th post quite after I quitted from the python3, and I didn't used the copy-past. Now I reviewed, what was typed in the terminal. I have used the rows=[[-1, 0, 0], [0,-1,0...
PhysChem Homework 6 3,701 Aug-28-2018, 07:41 PM
    Thread: random matrix, with some special feature
Post: RE: random matrix, with some special feature

No problem, once you told me the random.choice() function, I got what I needed. Is there any difference between list([blabla], [bla]) and [[blabla], [bla]] ? Or the interpreter handle them as syno...
PhysChem Homework 6 3,701 Aug-28-2018, 06:56 PM
    Thread: random matrix, with some special feature
Post: RE: random matrix, with some special feature

Thank you for the answer. The matrix is not exactly what I want (only one non-zero element is wanted in each row), but I was able to modify it. Instead of using the permutations() function I typed th...
PhysChem Homework 6 3,701 Aug-28-2018, 05:06 PM
    Thread: random matrix, with some special feature
Post: random matrix, with some special feature

Hi! I wish to create a random 1000*3 sized (1000 row & 3 column) matrix with the following conditions: 1) the matrix must be filled only with the following elements: -1; 0; 1 2) in every row-v...
PhysChem Homework 6 3,701 Aug-28-2018, 03:48 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020