array_utils.py 1.0 KB

12345678910111213141516171819202122232425
  1. from sympy.tensor.array.expressions.array_expressions import ArrayTensorProduct, ArrayContraction, ArrayAdd, \
  2. ArrayDiagonal
  3. from sympy.tensor.array.expressions.conv_array_to_matrix import convert_array_to_matrix
  4. from sympy.tensor.array.expressions.conv_indexed_to_array import convert_indexed_to_array
  5. from sympy.tensor.array.expressions.conv_matrix_to_array import convert_matrix_to_array
  6. from sympy.utilities.exceptions import sympy_deprecation_warning
  7. sympy_deprecation_warning(
  8. """
  9. Array expressions inside the codegen module are deprecated. Use the
  10. experimental module in sympy.tensor.array.expressions instead
  11. """,
  12. deprecated_since_version="1.8",
  13. active_deprecations_target='deprecated-arrayexpressions',
  14. )
  15. CodegenArrayTensorProduct = ArrayTensorProduct
  16. CodegenArrayContraction = ArrayContraction
  17. CodegenArrayElementwiseAdd = ArrayAdd
  18. CodegenArrayDiagonal = ArrayDiagonal
  19. recognize_matrix_expression = convert_array_to_matrix
  20. parse_matrix_expression = convert_matrix_to_array
  21. parse_indexed_expression = convert_indexed_to_array