Skip to content

Tag: python

OpenCV text and shapes look vague on my PC compared to other PC

I have a python script that draws text and shapes using the OpenCV library. The text and shapes look great on my Ubuntu PC (ran in VirtualBox) with 1920×1080 resolution. When I run the exact script on my own Windows 11 system with the same 1920×1080 resolution it looks really vague. This is is the m…

Problems installing lxml on M1 mac

So, I’m having the classic trouble install lxml. Initially I was just pip installing, but when I tried to free up memory using Element.clear() I was getting the following error: I thought this must be because lxml is using the system’s libxml2 which is probably out of date. So I used homebrew to i…

how to handle big loops in python?

This is more to do with my code as i’m sure i’m doing something wrong all i’m trying to do is call a main function to repeated itself with a recursive number that at some point i’ll reset. here is my code At first the main thread runs fine, but somewhere in the 2500 interval +- it just…

Multiply two matrices with different dimensions python

Error: ValueError: shapes (3,1) and (3,2) not aligned: 1 (dim 1) != 3 (dim 0) The error occurs because the matrices are different sizes, but how can I multiply two matrices with different size and where the resulting output should be: [-0.78 0.85]? Any help is appreciated! Mathematical question, for better un…