I am currently working on a intro project in Computer Graphics. For a specific part of my implementation, I am working with a boolean NumPy matrix, where all the values are False and some rows/columns are True. Lets say I have two boolean matrices of different sizes (for context - this is because while running some of the rows/columns are deleted):
[[True, False, False]
[True, False, False]
[True, False, False]]
and
[[True, True]
[False, False]
[False, False]]
I would like to create a new matrix that will be:
[[True, True, True]
[True, False, False]
[True, False, False]]
=> meaning I would like to receive a matrix holding all of the true values from both rows and columns matrices.
How can this be done? Thanks
You cannot add matrix of different size programmatically. You could come up with a system that changes the boolean values by working on the indices of the single vectors (row or column), but the function must be built by excluding the values you don't want to change. In essence it's an algorithm that works in a specific and not a generic way, therefore the concrete functioning depends on how you want the function to work based on the specific case