Query regarding operation of _flatten function

5 views
Skip to first unread message

Preetham Chandra

unread,
7:05 PM (4 hours ago) 7:05 PM
to sympy
Hello all,
This is my first time here and I am working on issue #28823. I found a mistake in the implementation of _flatten function in array_expressions.py and I believe that I have fixed it. I just wanted to confirm my understanding of what the _flatten function was intended to do, before submitting a PR.

Are ArrayDiagonal(A, (2, 6), (3, 7), (0, 5), (1, 5)) and ArrayDiagonal(ArrayDiagonal(A, (2, 6), (3, 7)), (0, 3), (1, 5)) equivalent where the first one is got after flattening of second one? where
A = ArraySymbol("A", (1, 1, 1, 1, 1, 1, 1, 1)).

My understanding is that while removing the nesting it should also remap the axes indices. Can anyone confirm it? Also are there test cases for these operations?
Thank you

Reply all
Reply to author
Forward
0 new messages