Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to check if a file has finished being written
Post: How to check if a file has finished being written

I have a programme that writes an mtx file to a specified directory on my laptop. It's a very large file (~400,000 KB) and so takes quite some time to finish being written. The next block in my code i...
leocsmith General Coding Help 2 7,845 Apr-14-2021, 10:01 AM
    Thread: Compare each element of an array in a logic statement without using a for loop
Post: RE: Compare each element of an array in a logic st...

But I don't want to check if all or any elements satisfy the logic statement. I want to look at each element individually and change its value based on how it responds to the logic statement. Some ele...
leocsmith General Coding Help 3 5,861 Apr-01-2021, 12:36 PM
    Thread: Compare each element of an array in a logic statement without using a for loop
Post: Compare each element of an array in a logic statem...

I want to compare each element of an array to a numerical value without using a for loop. Here's my code: if rho_phys * np.power(B, eta) <= np.maximum(0, rho_phys - move): rho_new = np.maximum(...
leocsmith General Coding Help 3 5,861 Mar-31-2021, 11:11 AM
    Thread: How do I make a symmetric matrix from a column vector?
Post: RE: How do I make a symmetric matrix from a column...

Thanks for this.
leocsmith General Coding Help 3 3,680 Mar-30-2021, 10:17 AM
    Thread: How do I make a symmetric matrix from a column vector?
Post: RE: How do I make a symmetric matrix from a column...

(Mar-29-2021, 10:33 AM)leocsmith Wrote: I have to transfer some code from MATLAB to python. The code takes a (300x1) column matrix, A, and converts it into a (24x24) symmetric matrix, B. As an examp...
leocsmith General Coding Help 3 3,680 Mar-30-2021, 10:15 AM
    Thread: How do I make a symmetric matrix from a column vector?
Post: How do I make a symmetric matrix from a column vec...

I have to transfer some code from MATLAB to python. The code takes a (300x1) column matrix, A, and converts it into a (24x24) symmetric matrix, B. As an example, A = [i1; i2; i3; i4; i5; i6; ...] and ...
leocsmith General Coding Help 3 3,680 Mar-29-2021, 10:33 AM

User Panel Messages

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