Ask Your Question
0

Finding positive matrices

asked 2021-03-15 20:17:13 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Hi. I am new in Sage, so please accept my apologies if my question is basic.

Let $L=[A1,A2,A3,...,A100]$ be a list of non-negative matrices. I want to find a list that contains all positive matrices. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-03-15 22:34:46 +0100

Max Alekseyev gravatar image

updated 2021-03-15 22:50:39 +0100

[A for A in L if min(map(min,A))>0] should do the job.

edit flag offensive delete link more

Comments

Thank you for your comment!

Blue sky gravatar imageBlue sky ( 2021-03-16 20:48:17 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2021-03-15 20:17:13 +0100

Seen: 204 times

Last updated: Mar 15 '21