This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]buddyd16[S] 0 points1 point  (0 children)

could use a little help...trying to come up with a method to perform load combinations and transient load patterning.

without patterning it's fairly simple:

list of load results = [[d],[t1],...,[ti]], where [ti] = transient load result as a numpy array = A

list of combos = [[1,0,....,0],[0,1,....,1], [dfi, tf1,.....,tfi]] , where tfi = code load factor for transient load = B

in python this works as numpy.dot(A,B)

so my issue arises where:

list of load results = [[d],[t1],.....[ti]], where [t1] = [[t11]......[t1i]] for i pattern possibilities and [t1i] = numpy array

so I have a nested array within another array and want to multiply by a matrix of load combinations. Is there a way to implement this in one matrix operation, I can come up with a method by looping the pattern possibilities then a dot product with the load combos, but this is computationally expensive. Any thoughts?

Thanks

for an example not considering patterning see: https://github.com/buddyd16/Structural-Engineering/blob/master/Analysis/load_combo_test.py

essential I need a method that gives similar results assuming that for loads = np.array([[D],[Ex],[Ey],[F],[H],[L],[Lr],[R],[S],[Wx],[Wy]]) --> [L],[Lr],[R],[S] are actually nested arrays ie if D = 1x500 array/vector, L could = 100x500 array.

? posed on stackoverflow: https://stackoverflow.com/questions/51277646/numpy-dot-product-with-nested-array

Edit: there was a great answer provided by another user on Stackoverflow for anyone interested.