79272835

Date: 2024-12-11 18:50:51
Score: 2
Natty:
Report link

Thanks to @Reinderien in the comments for the solution idea. Scipy has a solve_sylvester function specifically for this problem, namely,

import scipy

X = scipy.linalg.solve_sylvester(A, -A, B)

This could use optimizations for my case, but it will work well enough. Unfortunately, the function does not seem to support batching.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • User mentioned (1): @Reinderien
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ben