matrix tag

7 questions


1 answers
53 views
0
c Language sparse matrix Question!

How do you write a function that compares the subscripts (i,j) and (x,y) of the elements in two matrices and the order of the elements given?int Compare(int i, int j, int x, int y) if((i,j) < (x,y)...

1 years ago

1 answers
70 views
0
How can I restore it from the zip?

I use the zip like thislist1 = ['a', 'b', 'c', 'd']list2 = [1, 2, 3, 4]result = zip(list1, list2) #[('a', 1), ('b', 2), ('c', 3), ('d', 4)]The opposite of the zip[('a', 1), ('b', 2), ('c', 3), ('d', 4...


1 answers
71 views
0
Python factor delivery question

defis_product_availability_matrix(matrix_a, matrix_b): row_a = [row for row in matrix_a] column_b = [column for column in zip(*matrix_b)] if(len(row_a) == len(column_b)): result = True else: result ...

1 years ago

1 answers
67 views
0
Python Matrix Question: How do I make the right top, left top, right bottom, left bottom only 1 and the rest zero?

How do you make the top right, top left, bottom right, bottom left, and bottom left only 1 and the rest zero?[[1 0 0],[0 0 0],[0 0 0]][[ 0 0 1],[0 0 0],[0 0 0]][[0 0 0],[0 0 0],[0 0 1]][[ 0 0],[0 0 0]...

2 years ago

1 answers
64 views
0
Is this wrong to find the permanent space of the matrix with Python sympy?

Jupiter laptop site is looking for the matrix's permanent space with PythonIt keeps printing like this, is there anything wrong?>>> from sympy import *>>> m=Matrix([[2, 3], [1, 2]])&...

2 years ago

1 answers
77 views
0
Matrix output of txt file from Python

3 21.0 2.0 3.04.0 5.0 6.03 21.0 2.0 3.04.0 5.0 6.0I want to call the intxt file Python and print out two matrices and find the sum of the two matrices.A=1.0 2.0 3.04.0 5.0 6.0I hope it comes out lik...

2 years ago

1 answers
59 views
0
Matrix Configuration Question (matrix values between matrix values at specific coordinates)

Hello, I'm a student studying Python.I'm writing the code that makes up the matrix I have a question because there's a traffic jam TT If there's a matrix like picture number one, I want to construct a...

2 years ago

© 2024 OneMinuteCode. All rights reserved.