matrix from matrix

Steve D'Aprano steve+python at
Fri Jan 13 10:23:47 EST 2017

On Fri, 13 Jan 2017 10:38 pm, adnan.connexus at wrote:

> Hi all,
> I have just started python coding  and have ran into my first brick wall. 
> Can some one please assist me with the following query  ?

Not really, because you haven't given us enough information to answer your

>  I have two Matrices:

What is a matrix? Do you mean a list? A numpy array?

The best thing is to show us the code you already have. We don't need to see
ALL your code, just the relevant part that creates the two matrices.

> 1 – masterMatrix – A 2d matrix containing items in the rows and time as
> the columns column headers (time beginning from 00:00 to 23:45 at every 15
> minutes interval (96 columns e.g. 00:00 | 00:15 . . . .23:45). this matrix
> provides a value of each item in the list a every 14 minutes.
> 2 – subMatrix – A matrix which has to be populate based on selected items
> and times from masterMatrix

How do you select the items that you want?

> What would be the fastest way to first initialise the subMatrix  and
> populate the workingTable based on the matching values in masterTable.

That's like asking:

"What's the shortest piece of string to tie two things together?"

Um, it depends on which two things, it depends on how secure you need the
tie to be... we need more detail.

“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

More information about the Python-list mailing list