Python Forum
Checking the elements of a matrix with an elements of a list
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking the elements of a matrix with an elements of a list
#5
Hello,
I have an easy question. I have an matrix like
C=[[1 2 3]
[4 5 6]
[7 8 9]
and I have a list L=[5 10 5]
I need to check if the elements of first line is less than 5 (L[0]), if the elements of second line is less than 10(L[1]) and if the elements of last line is less than 10(L[2])
And I need the combine this check with other condition :
Let's say
if a>b and "the controls above"

How can I write it ?
Thank you so much
Reply


Messages In This Thread
Checking the elements of a matrix with an elements of a list - by juniorcoder - Sep-17-2018, 11:03 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  OR-Tools LP Limit Number of Elements in Solution idratherbecoding 0 787 May-14-2023, 11:02 PM
Last Post: idratherbecoding
  Printing file path of lift elements dyerlee91 1 1,520 Sep-27-2021, 01:22 PM
Last Post: snippsat
  Join each list elements with string in other DF handy88 0 1,549 Feb-09-2021, 07:00 PM
Last Post: handy88
  updating cluster of elements based on the max value of distance alex80 0 1,606 Oct-02-2020, 11:11 AM
Last Post: alex80
  Fastest way to subtract elements of datasets of HDF5 file? Robotguy 3 2,665 Aug-01-2020, 11:48 PM
Last Post: scidam
  Formula with elements of list - If-condition regarding the lists elements lewielewis 2 2,751 May-08-2020, 01:41 PM
Last Post: nnk
  define certain array elements+display with digits lukezo 0 1,269 Apr-10-2020, 05:03 PM
Last Post: lukezo
  How to prepare a NumPy array which include float type array elements subhash 0 1,927 Mar-02-2020, 06:46 AM
Last Post: subhash
  How to access dataframe elements SriMekala 4 3,253 Jul-30-2019, 01:50 AM
Last Post: scidam
  When dividing elements of matrix i would like the result 0 instead of inf? Koczkodan 4 2,974 Jul-22-2019, 11:40 AM
Last Post: Koczkodan

Forum Jump:

User Panel Messages

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