Ask Your Question

Finding positive matrices

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

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

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

Max Alekseyev gravatar image

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

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

edit flag offensive delete link more


Thank you for your comment!

Blue sky gravatar imageBlue sky ( 2021-03-16 20:48:17 +0200 )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


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

Seen: 165 times

Last updated: Mar 15 '21