Years ago, I used object-prototyping to write a pretty nifty graphical demo of, basically, oversampling.
I’ve also updated my dev branch, including the kwargs changes.
The demo no longer works.
Demo code: Interactive oversampling demo · GitHub
The issue is occurring in the data_ function, where array
is receiving a single 0. It’s supposed to receive an array: data.data = Array.fill(size, 0);
.
I think the kwargs stuff is mistakenly distributing the array values across argument names (but there’s only one, so most of the array gets discarded).
I have to admit that I’m a bit lost on all the ins-and-outs of the kwargs change. If it’s necessary to break compatibility, then users should be given some guidelines on how to update their old code. But it would be better not to break compatibility, I think.
Relevant top of stack trace:
ERROR: Container got 0 values, expected 32
PROTECTED CALL STACK:
a FunctionDef 0x56159bfc7368
sourceCode = "<an open Function>"
arg self = ('upsampleShift_': a Function, 'data_': a Function, 'fft_': a Function, 'upsampleShift': 0,
'syncShifted': a Function)
arg array = 0 <<-- here, this should be an array
a FunctionDef 0x5615987edd40
sourceCode = "<an open Function>"
arg func = a Function
Object:!? 0x561592782500
arg this = a Function
arg obj = a Function
IdentityDictionary:doesNotUnderstand 0x5615987ed8c0
arg this = ('upsampleShift_': a Function, 'data_': a Function, 'fft_': a Function, 'upsampleShift': 0,
'syncShifted': a Function)
arg selector = data_
arg args = nil
arg kwargs = nil
Not logging as a bug yet because I’m not sure if the policy going forward is that this type of code needs to be edited.
hjh