« first day (4565 days earlier)      last day (606 days later) » 

00:10
@Combobulated judging from Qt the OS might be important. Is this windows?
 
14 hours later…
14:11
@AndrasDeak--СлаваУкраїні yes
@Combobulated I tried to find a solution for you, but I think it's a bug in tkinter. By default, resizable(False, False) only disable resizing the window if the window isn't zoomed/or fullscreen. If it's windowed, then it act as wanted.
One trick I tried was to make a non-fullscreen/non-zoomed window, then resize it to the same width and height as the screen/monitor, but with a difference against the height of the taskbar. Problem with that is, the taskbar isn't correctly (even with ctypes/win32 api) reported on Win10 based on testing.
Another last thing I tried is to only use the size of the title bar of the tkinter window, since for some reason, when manually doing the difference against the height of the screen, it somehow correlated with the size of the title bar, always
problem then occurred with getting the right size of the tile bar since it change based on DPI being scaled or not...but I kinda managed to make it work, at least when manually setting the difference
the main problem with this trick is then to position the window at the same position as the screen, since it move the window on creation a bit to the left/right.
also, feel free to discuss/ask about this on the tkinter room if you want.
I want to replicate np.linspace(t0, t0+L, N, endpoint=True).
Is there any simpler than np.append(t0 + np.arange(0, N-1) * L/(N-1), t0+L) ?
14:26
Using the original method? I have no idea why you'd need to replicate something that uses the same library anyway
I am a masochist. :-)
probably floating-point errors but it might still be an XY problem
also not sure what the arange doesn't just go to N
@TheRealMasochist but presumably since you're a real masochist, just go for it
Yes. I just need another approach if possible without append.
np.append isn't really like building something up from first principles
@NordineLotfi I just noticed I meant to say "By default, resizable(False, False) only disable resizing the window while shoving the taskbar if the window isn't zoomed/or fullscreen. If it's windowed, then it act as wanted.". Didn't had my coffee yet...
14:30
@NordineLotfi Thanks
there also the following existing question about this: stackoverflow.com/questions/68683393/… (answered but this isn't the solution for this), stackoverflow.com/questions/73112195/… (no answers)
@AndrasDeak--СлаваУкраїні I see. It should be t0 + np.arange(0, N) * L/(N-1).
Does linspace internally use arange?
14:48
Just see the source for yourself
Thanks. :-)
 
4 hours later…
19:04
How to initialize global array for concatenation?
notes = [52, 52, 59, 59, 61, 61, 59, 59, 57, 57, 56, 56,
         54, 54, 56, 52, 59, 59, 57, 57, 56, 56, 54, 54]

output = np.array(0)
for n in notes:
    output = np.concatenate([output,getTone(n)])
ValueError: zero-dimensional arrays cannot be concatenated
I don't think numpy arrays can be efficiently concatenated. It would probably be better to use a list and convert it to an array at the end
OK. THanks.
How to combine [a,b] and [c,d] to become [a,b,c,d]?
19:20
+
assuming i have output =[]
for i in [[a,b],[c,d]]:
output.append(i)
produces wrong output which is [[a,b],[c,d]]
output += i
the resulting wav cannot be played because the format is unknown.
@TheRealMasochist yeah, we do actually have rules for the room
Apparently every time we help, the snippet you need help with grows larger?
19:26
I can't call you Aran-Corner-Case-Fey?
Sounds like a mouthful, but if you're ok with that...
I really wish I had something witty but I've let myself down here :/ I'll back out
import numpy as np

output = []
for i in range(5):
    output.append(np.linspace(0,1,2).tolist())

print(output)
Output wrong: [[0.0, 1.0], [0.0, 1.0], [0.0, 1.0], [0.0, 1.0], [0.0, 1.0]]
It should be flatten.
So use .extend() instead?
I see. thanks.
19:34
None of this makes sense, btw
It makes sense.
notes = [52, 52, 59, 59, 61, 61, 59, 59, 57, 57, 56, 56,
         54, 54, 56, 52, 59, 59, 57, 57, 56, 56, 54, 54]

output = []
for n in notes:
    output.extend(getTone(n).tolist())

output = np.array(output)
19:49
@TheRealMasochist please read a Python tutorial, then read a NumPy tutorial. Both have official tutorials.
I see. A good advice for long term. :-)
Also for the short one if you want to keep asking for help here
For now.

« first day (4565 days earlier)      last day (606 days later) »