Wandas 0.10.0¶
Wandas 0.10.0 is a correctness and performance release. It fixes the review
findings against 0.9.0 (filter divergence, short-input FFT amplitude,
noct_synthesis levels, integer overflow, N-octave bands below 25 Hz and
more), makes long recordings plot, load and save much faster, writes Recipes as
readable JSON (schema 3) and reads MP3 and Opus files.
Highlights / 主な変更¶
- Butterworth filters no longer return NaN at high orders and low cutoffs.
- Short FFT and cepstrum inputs keep their amplitude, and
noct_synthesis()band levels matchnoct_spectrum(). noct_spectrum()andnoct_synthesis()accept bands outside MoSQITo's nominal table, such asfmin=20.- Waveform plots of long recordings draw in seconds, chained channel-wise operations build linear graphs, and WDF and multichannel audio load faster.
np.abs(frame),np.log10(frame),ndarray + frameand other element-wise NumPy ufuncs return lazy frames that can be saved as Recipes.- Recipe JSON schema 3 writes floats as plain numbers. Recipe operation versions written only before 0.9.0 no longer replay.
wd.readreads MP3, Opus, OGA, AU, CAF, W64 and RF64.
Changes¶
- #486: read MP3, Opus, OGA, AU, CAF, W64 and RF64.
- #488: describe registered Recipe operations.
- #489:
Literalannotations for fixed-choice parameters. - #490: transform each channel once for cross-spectral matrices.
- #493: atomic WDF save.
- #495: Butterworth filters as second-order sections.
- #497: reject irregular CSV time columns.
- #499: window short FFT and cepstrum inputs before zero-padding.
- #504:
noct_synthesisRMS band levels. - #508: mono
RoughnessFramechannel axis. - #510:
sum/meankeep the shared reference and first offset. - #513:
roughness_dw_specleaves user metadata unchanged. - #515: integer arithmetic in
float64. - #518:
set_paramskeeps unspecified parameters. - #520: zero
n_fftandhop_lengthpassed through. - #522: local RNG in
FrameDataset.sample. - #523: channel-wise graphs with one
map_blockslayer per stage. - #525: Recipe schema 3.
- #529: wheel ships
py.typed. - #531: drop unused
requestsandcattrs. - #534: lazy
scipy.signalimport. - #535:
mlextra on Python 3.14. - #537: block-wise decoding of selected channels.
- #539:
describe()computes the frame once. - #541: 4 MB WDF chunks.
- #543: waveform envelope plot.
- #544: N-octave bands outside MoSQITo's nominal table.
- #547: element-wise NumPy ufuncs return frames.
- #549: drop Recipe replays written only before 0.9.0.
Compatibility and migration / 互換性と移行¶
| Affected surface or artifact | Classification | Deprecation start | Replacement or migration | Removal/change version | Exception reason and decision link |
|---|---|---|---|---|---|
Recipe JSON schema (wandas.recipe) |
Serialized | None | Schema 2 files still load; re-save to write schema 3. Older wandas versions cannot load schema 3 | 0.10.0 | Maintainer accepts breaking Recipe format changes; #524 |
Element-wise NumPy ufuncs on frames (np.abs(frame), ndarray + frame, ...) |
Stable, semantic change | None | np.asarray(frame) before the ufunc keeps an ndarray result |
0.10.0 | The eager fallback never shipped a release with a warning; maintainer decision to switch directly; #514 |
wandas.audio.power, wandas.audio.abs, wandas.audio.channel_difference and wandas.operator.* Recipe nodes on integer input |
Serialized, semantic change without a version bump | None | Replays on integer input return float64; cast with astype only if an integer result is required |
0.10.0 | A private replay would only reproduce wrapped-around values; floating-point input is unchanged; #511 |
| High-pass, low-pass and band-pass filter Recipe nodes | Serialized, operation version 2 | Not applicable | New Recipes publish version 2; version 1 nodes replay the previous filtfilt numerics. Readers before 0.10.0 reject version 2 |
0.10.0 | #495 |
fft, cepstrum, ifft (version 3), noct_synthesis (version 3), sum/mean (version 2) and welch (version 3) Recipe nodes |
Serialized, new operation versions | Not applicable | Saved Recipes replay their previous numerics; newly captured ones use the new versions, which older readers reject | 0.10.0 | #499, #504, #510, #520 |
WDF of SpectralFrame/CepstralFrame with win_length < n_fft |
Serialized, additive field | Not applicable | Upgrade readers to 0.10.0 before exchanging these files; other files are unchanged | 0.10.0 | #499 |
RoughnessFrame .data of one channel selected from a multi-channel frame |
Stable, semantic change | None | Shape is (47, n_time) instead of (1, 47, n_time); index with [np.newaxis] if the old shape is needed |
0.10.0 | Matches other Frame types and mono frames; #508 |
Integer or boolean ChannelFrame arithmetic, power(), abs(), channel_difference() and listed ufuncs |
Stable, semantic change | None | Results are float64; cast with astype only if an integer result is required |
0.10.0 | The old results wrapped around silently; #515 |
Inputs that now raise ValueError: filters on inputs no longer than SciPy's padding, fft()/cepstrum() of an empty input with n_fft, welch(n_fft=0), CSV files with an irregular time column, and SpectralFrame/CepstralFrame arithmetic on operands whose win_length or window differ |
Stable, semantic change | None | Pass a longer input or a valid n_fft, resample irregular CSV data, and combine frames computed with the same window |
0.10.0 | They previously returned NaN, zeros or wrong values, or silently used another parameter; #495, #497, #499, #504, #520 |
ChannelFrameDataset.stft(hop_length=0) items |
Stable, semantic change | None | Items are None like other per-item STFT failures; omit hop_length for the default |
0.10.0 | #520 |
overlap key in the metadata of roughness_dw_spec() results |
Stable, removal | None | Read RoughnessFrame.overlap or the operation history |
0.10.0 | It duplicated frame state into user metadata; #513 |
requests and cattrs runtime dependencies |
Internal-only | Not applicable | Declare them in your own project if you use them | 0.10.0 | wandas never imported them; #531 |
Recipe operation version 1 of fft, welch, stft, cepstrum, csd, coherence, transfer_function, rms_trend, sound_level, ifft and noct_synthesis |
Serialized | None | Save the Recipe again with 0.9.0 or later | 0.10.0 | Only releases before 0.9.0 wrote these versions; maintainer decision to keep replay for the previous release's versions; #548 |
0.10.0で保存したRecipe(schema 3、新しいoperation version)と、win_lengthがn_fftより短い
WDFは0.9.0以前では読み込めません。交換する環境のwandasを先に0.10.0へ揃えてください。
0.9.0で保存したRecipeは従来の数値で再生されますが、0.9.0より前のリリースだけが書いた
操作versionのRecipeは読み込めないため、保存し直してください。NumPyのufuncはndarrayではなく
フレームを返します。複数チャネルのRoughnessFrameから1チャネル選んだ
.dataの形状、整数入力の演算結果のdtype(float64)、新たにValueErrorになる入力は上の表を
確認してください。
Added / 追加¶
wd.read,wd.inspect,wd.supported_formats()andfrom_folder()accept MP3, Opus, OGA, AU, CAF, W64 and RF64 files through the bundled libsndfile (also in Pyodide). 同梱のlibsndfile(Pyodideにも含まれます)を使って、wd.read・wd.inspect・wd.supported_formats()・from_folder()がMP3・Opus・OGA・AU・CAF・W64・RF64を 扱えるようになりました。RecipeRegistry.describe()andRecipeOperation.describe()return a machine-readable catalog of Recipe operations: ID, version, method name, input bindings, and method parameters with defaults andLiteralchoices.@recipe_operationrecords the decorated method onRecipeOperation.method; capture and replay are unchanged. Recipe操作のカタログ(ID、version、メソッド名、入力、引数・既定値・Literalの選択肢)を 返すRecipeRegistry.describe()を追加しました。
Changed / 変更¶
- High-pass, low-pass and band-pass filters are designed as second-order
sections and applied with
sosfiltfilt. The previous(b, a)+filtfiltkernel returned NaN at high orders and low cutoffs (for example order 8 at 100 Hz / 48 kHz). Inputs no longer than SciPy's padding raise SciPy'sValueError. The filter Recipe operations move to version 2; saved version 1 Recipes replay the previous numerics. The band-pass filter order is2 * order. ハイパス・ローパス・バンドパスフィルタを2次セクション(SOS)で設計し、sosfiltfiltで 適用するようにしました。これまでの(b, a)とfiltfiltは、高次数・低いカットオフで NaNを返していました(例:48 kHzで100 Hz、8次)。SciPyのパディング長以下の入力では SciPyのValueErrorが出ます。フィルタのRecipe操作はversion 2になり、保存済みの version 1は従来の数値で再生されます。 ChannelFrame.csd(),transfer_function()andcoherence()transform each channel's Welch segments once instead of once per pair, soselect_pairs()andselect_pair()now save time and memory. Values are unchanged.ChannelFrame.csd()・transfer_function()・coherence()は、チャネルの組ごとではなく チャネルごとに1回だけWelchセグメントを変換するようになり、select_pairs()・select_pair()で時間とメモリを節約できます。値は変わりません。- The waveform plot now draws long recordings as an envelope of one bin per
horizontal pixel of the axes, each drawn as its minimum, middle and maximum
sample (
max_points="auto", the new default). The picture matches drawing every sample, the budget follows the figure size and the saved dpi, and zooming redraws the visible span from the full samples, so long multichannel recordings plot in seconds instead of minutes. Lines with markers or dashes, and nonlinear (e.g. log) axes, still draw every sample by default. Pass an integer such asmax_points=4000for a fixed budget, ormax_points=Noneto draw every sample as before. 波形プロットは、長い録音を軸の横幅1画素ごとのビンの最小・中央・最大のサンプルで描く 包絡で描くようになりました(新しい既定のmax_points="auto")。見た目は全サンプルを 描いた場合と同じで、点数は図の大きさと保存時のdpiに合わせて決まり、拡大すると表示範囲を 元のサンプルから描き直すので、長い多チャネルの録音も数分ではなく数秒で描けます。マーカーや 破線を使う線と、対数などの非線形の軸では、既定でも全サンプルを描きます。点数を 固定するにはmax_points=4000のように整数を、これまでどおり全サンプルを描くにはmax_points=Noneを指定します。 import wandasno longer importsscipy.signal; SciPy loads it on the first operation that needs it, which shortens import by about a quarter.import wandasの時点ではscipy.signalを読み込まず、必要な処理を最初に実行したときに 読み込むようにしました。importにかかる時間が約4分の1短くなります。ChannelFrame.describe()computes the frame once and draws every channel's waveform, spectrogram and spectrum from that result. A file-backed frame was decoded, and any processing in front of it recomputed, once per view per channel (24 times for 8 channels). Figures are unchanged.ChannelFrame.describe()はフレームを一度だけ計算し、その結果から各チャネルの波形・ スペクトログラム・スペクトルを描くようにしました。これまではファイルから読み込んだ フレームを図ごと・チャネルごとに読み直し、前段の処理も毎回計算し直していました (8チャネルで24回)。図の内容は変わりません。- Parameters that already accept only a fixed set of strings are annotated
with
Literal[...], so type checkers flag other values and, for Recipe operations,RecipeRegistry.describe()reports the choices:averageofwelch(),csd()andtransfer_function();scalingofcsd(),transfer_function()andSpectrogramFrame.csd();detrendofstft()(Frame and dataset);alignofmix(),add_channel()andconcat_frame();weightingandfield_typeofsharpness_din()andsharpness_din_st();field_typeofloudness_zwtv()andloudness_zwst();freq_weighting("A","C","Z",None) andtime_weighting("Fast","Slow") ofsound_level(). Runtime validation and accepted values are unchanged;sound_level()still accepts other spellings such as"a"or"F"at runtime, but type checkers now report them. 既に固定の文字列だけを受け付ける引数にLiteral[...]注釈を付けました。実行時の検証と 受け付ける値は変わりません。 fft()andcepstrum()of an input shorter thann_fftwindow the available samples before zero-padding, so a short sinusoid keeps its amplitude.SpectralFrameandCepstralFramegainwin_length(defaultn_fft): Welch and STFT frames record theirs, spectral envelopes inherit the cepstrum's,ifft()undoes the gain of that window, and frame-frame arithmetic rejects operands whosewin_lengthdiffers. Thefft,cepstrumandifftRecipe operations move to version 3; released version 2 payloads replay their previous numerics, so a saved Recipe gives the same result as before and a newly captured one uses the new numerics. WDF files of frames whosewin_lengthis shorter thann_fftstore it and are rejected by older readers, so upgrade readers before exchanging them; other files are unchanged. An empty input with an explicitn_ffthas no analysis window, sofft()andcepstrum()now raiseValueErrorinstead of returning an all-zero spectrum or a floor-only cepstrum.n_fftより短い入力のfft()とcepstrum()は、窓を掛けてからゼロ詰めするようになり、 短い正弦波でも振幅が保たれます。SpectralFrameとCepstralFrameにwin_lengthを 追加し、fft・cepstrum・ifftのRecipe操作をversion 3にしました。保存済みの version 2は従来の数値で再生されます。win_lengthがn_fftより短いWDFは旧版では 読み込めません。空の入力にn_fftを指定した場合は解析窓がないため、ゼロのスペクトルや floorだけのケプストラムを返さずValueErrorになります。SpectralFrame.noct_synthesis()band levels were about 4.8 dB too high for a Hann-windowed spectrum, and more for zero-padded input, because the peak-amplitude bins were passed to MoSQITo as RMS bins and the window's leakage was counted as power. The bins are now converted to RMS and divided by the square root of the window's equivalent noise bandwidth, so the levels matchnoct_spectrum().NOctSynthesistakes the sourcewindowandwin_length;noct_synthesis()passes the frame's. The Recipe operation moves to version 3, and saved version 2 Recipes replay the previous numerics. Because the band levels depend on the window, frame-frame arithmetic onSpectralFramenow also rejects operands whosewindowdiffers.SpectralFrame.noct_synthesis()のバンドレベルが、Hann窓で約4.8 dB、ゼロ詰め入力では それ以上高く出ていました。ピーク振幅をRMSに換算し、窓の等価雑音帯域幅で補正するように したため、noct_spectrum()と一致します。Recipe操作はversion 3になり、保存済みの version 2は従来の数値で再生されます。窓が異なるSpectralFrame同士の演算はValueErrorになります。ChannelFrame.sum()andmean()reset the reference to the unit default, so levels of the result were off when the channels used another reference. When the channels' offsets differed, the result'ssource_time_offsetwas reset to 0. The result now keeps the reference the channels share and the first channel's offset, the same as binary arithmetic keeps the left operand's. The Recipe operations move to version 2, and saved version 1 Recipes replay the previous metadata.ChannelFrame.sum()とmean()は基準値を単位の既定値に戻していたため、別の基準値を 使うチャネルではレベルがずれていました。チャネルの時刻オフセットが異なると、結果のsource_time_offsetは0になっていました。チャネルに共通の基準値と、二項演算が左辺の オフセットを保持するのと同じく先頭チャネルのオフセットを保持するようにしました。 Recipe操作はversion 2になり、保存済みのversion 1は従来のメタデータで再生されます。roughness_dw_spec()no longer copiesoverlapinto the frame's usermetadata, so the key is no longer written to WDF files. Read it fromRoughnessFrame.overlapor the operation history.roughness_dw_spec()はoverlapをフレームのユーザーmetadataに書き込まなくなり、 WDFファイルにも保存されません。RoughnessFrame.overlapか操作履歴から読んでください。power(),abs(),channel_difference(),+ - * **and the NumPy ufuncsadd,subtract,multiply,power,square,absoluteandnegativeon aChannelFrameholding integer or boolean samples now compute infloat64whenever NumPy would have produced an integer dtype (in plain ufunc calls withoutout,dtypeorsignature; methods such asnp.multiply.outerare unchanged). They previously wrapped around silently (for example,int16power(2)of 29500 gave -2544). Operations with a floating-point operand keep NumPy's dtype promotion, sofloat32staysfloat32.int64values beyond 253 are rounded by thefloat64computation. 整数またはboolサンプルのChannelFrameに対するpower()・abs()・channel_difference()・+ - * **と、NumPyのufuncadd・subtract・multiply・power・square・absolute・negativeは、NumPyが整数dtypeで計算する場合にfloat64で計算するようになりました(out・dtype・signatureを指定しない 通常のufunc呼び出しが対象で、np.multiply.outerなどのメソッドは変わりません)。これまでは黙って桁あふれして いました(例:int16の29500のpower(2)が-2544)。浮動小数点のオペランドを含む 演算はNumPyの型昇格のままなので、float32はfloat32のままです。253を超えるint64の値はfloat64の計算で丸められます。requestsandcattrsare no longer runtime dependencies; wandas never imported them. Projects that use either package must declare it themselves. wandasが使っていなかったrequestsとcattrsを必須依存から外しました。これらを 使うプロジェクトは自分の依存に追加してください。- Compressed WDF files store their data in one-channel chunks of about 4 MB
instead of the small chunks h5py guessed, so loading an 8-channel, 2-minute
48 kHz recording saved with the default
gziptakes about 5 s instead of 17 s. The format, the compression default and the stored values are unchanged. 圧縮したWDFファイルのデータを、h5pyが推定した小さなチャンクではなく、1チャネルあたり 約4 MBのチャンクで保存するようにしました。既定のgzipで保存した8チャネル・2分・48 kHzの 録音の読み込みが約17秒から約5秒になります。形式、圧縮の既定値、保存される値は変わりません。 - Recipe JSON moves to schema 3, which writes finite Python floats as plain
JSON numbers (
1000.0) instead of tagged IEEE hex payloads, so saved.recipe.jsonfiles can be read and edited. NaN, infinities, complex numbers and NumPy scalars keep the tagged bit-exact form. Schema 2 files still load and replay unchanged; wandas versions before this release reject schema 3 files as an unsupported schema version. A JSON integer reads as an int, so keep the decimal point (1000.0) when editing a float parameter by hand or with a tool that may rewrite it as1000. Recipe JSONはschema 3になり、有限のPythonの小数をタグ付きのIEEE 16進表記ではなく JSONの数値(1000.0)で書くようになりました。保存した.recipe.jsonを人が読んで 編集できます。NaN・無限大・複素数・NumPyのスカラーは従来どおりタグ付きの表記です。 schema 2のファイルはそのまま読み込んで再生できます。このリリースより前のwandasは schema 3のファイルを未対応のschema versionとして拒否します。JSONの整数はintとして 読まれるので、小数のパラメータを手やツールで編集するときは小数点(1000.0)を 残してください。 ChannelFrame.welch(n_fft=0, ...)ran withn_fft=win_length, andChannelFrameDataset.stft(hop_length=0)ran with the default hop, because0was treated as "not given".0is now passed through, sowelch()raises the sameValueErrorasstft(), and the dataset item becomesNonelike other per-item STFT failures.hop_length=Nonekeeps its default; the dataset's STFT history then omitshop_length, as a directChannelFrame.stft()call does, and replays with the same hop. The Welch Recipe operation moves to version 3; saved version 2 Recipes replay with the previous fallback.0を「指定なし」として扱っていたため、ChannelFrame.welch(n_fft=0, ...)はn_fft=win_lengthで、ChannelFrameDataset.stft(hop_length=0)は既定のhopで計算して いました。0をそのまま渡すようにしたので、welch()はstft()と同じValueErrorを出し、 データセットの要素は他のSTFTの失敗と同じくNoneになります。hop_length=Noneの既定値は 変わりません。その場合、データセットのSTFTの履歴にはChannelFrame.stft()を直接呼んだ ときと同じくhop_lengthが記録されず、再生しても同じhopで計算されます。WelchのRecipe操作はversion 3になり、保存済みのversion 2は従来の扱いで 再生されます。- On Python 3.14, the
mlextra installs PyTorch only, because TensorFlow publishes no Python 3.14 wheels; installingwandas[ml]there no longer fails to resolve. TensorFlowはPython 3.14用のwheelを公開していないため、Python 3.14ではmlextraが PyTorchだけを入れるようにしました。wandas[ml]のインストールが依存解決で失敗しなくなります。 - Element-wise NumPy ufuncs on a frame return a lazy frame of the same type
instead of computing the frame and returning an
ndarray:np.abs(frame),np.sqrt(frame),np.log10(frame),np.maximum(frame, 0.0),ndarray + frameandnp.add(frame, x). Arithmetic ufuncs record the same Recipe operations as the frame's operators (ndarray + frameadds an array-input pattern to the reverse operators), and other one- and two-input ufuncs recordwandas.numpy.ufuncwith the ufunc's name; ufuncs outside NumPy, such as SciPy's, return a frame that cannot be saved as a Recipe. Calibration is applied first and channel units are kept, as for the operators. Reductions such asnp.max(frame)andnp.add.reduce,np.matmul, comparisons,np.isnanand other boolean or multi-output ufuncs, and calls without,where,dtypeor other keyword arguments, and operands that broadcast the result beyond the frame's shape still return arrays; a frame cannot be anout=target. Callnp.asarray(frame)first to keep anndarrayresult. フレームに対する要素ごとのNumPy ufunc(np.abs(frame)・np.sqrt(frame)・np.log10(frame)・np.maximum(frame, 0.0)・ndarray + frame・np.add(frame, x)など)は、 フレームを計算してndarrayを返すのではなく、同じ型の遅延評価のフレームを返すように なりました。四則演算のufuncはフレームの演算子と同じRecipe操作を記録し(ndarray + frameの ために逆演算子に配列入力の形を追加)、それ以外の1入力・2入力のufuncはufunc名つきのwandas.numpy.ufuncを記録します。SciPyなどNumPy以外のufuncもフレームを返しますが、 Recipeには保存できません。校正係数は先に適用し、チャネルの単位は演算子と同じく保持します。np.max(frame)やnp.add.reduceなどの集約、np.matmul、比較、np.isnanなどのbool出力・ 複数出力のufunc、out・where・dtypeなどのキーワード引数を付けた呼び出しは従来どおり 配列を返します。フレームより大きな形状にブロードキャストされるオペランドも配列を返します。 フレームをout=に指定することはできません。ndarrayのままにしたい場合は 先にnp.asarray(frame)を呼んでください。 - Recipe replay keeps the operation versions written by 0.9.0 and drops
version 1 of
fft,welch,stft,cepstrum,csd,coherence,transfer_function,rms_trend,sound_level,ifftandnoct_synthesis, which only releases before 0.9.0 wrote. Loading such a Recipe fails with an "unregistered operation" error; save it again with 0.9.0 or later. From now on a release replays the operation versions written by the previous release. Recipeの再生は0.9.0が書いた操作versionまでとし、0.9.0より前のリリースだけが書いた 上記操作のversion 1を削除しました。該当するRecipeは読み込み時に「unregistered operation」エラーになるため、0.9.0以降で保存し直してください。今後は直前のリリースが 書いた操作versionまでを再生します。 - Chained channel-independent operations (filters, A-weighting, resampling,
noct_spectrum,normalize, HPSS, ...) build a lazy graph that grows linearly with channels × stages. Each stage copied the previous stage's graph once per channel, so an 8-channel frame with six chained filters built a graph of about 170,000 tasks before computing. Results are unchanged. チャネル独立の演算(フィルタ、A特性、リサンプリング、noct_spectrum、normalize、 HPSSなど)を重ねたときの遅延グラフが、チャネル数×段数に比例する大きさになりました。 これまでは段ごとに前段のグラフをチャネルの数だけ複製していたため、8チャネルに6段の フィルタを重ねると計算前に約17万タスクのグラフができていました。計算結果は変わりません。 - Reading a subset of channels from an audio file decodes the file in blocks and keeps only the requested channels, instead of first decoding every channel of the whole segment. Reading one channel of a multichannel file now needs memory for that channel plus one block of 65,536 frames. Samples are unchanged. 音声ファイルから一部のチャネルを読み込むとき、区間全体の全チャネルを一度に展開せず、 ブロックごとに展開して必要なチャネルだけを残すようにしました。多チャネルのファイルから 1チャネルを読む場合に必要なメモリは、そのチャネル分と65,536フレーム分のブロック1つだけに なります。サンプル値は変わりません。
Fixed / 修正¶
save()of a WDF file writes to a temporary file first, so a failed computation duringoverwrite=Truekeeps the existing file instead of leaving an all-NaN one, and a failed new save leaves no partial file. Overwrites keep the file's links, owner and permissions. WDFのsave()はまず一時ファイルに書き込むようにしました。overwrite=Trueで計算が 失敗しても既存のファイルが残り(以前はすべてNaNのファイルになっていました)、新規保存の 失敗で書きかけのファイルも残りません。上書きではリンク・所有者・権限が保たれます。- The CSV reader raises
ValueErrorwhen the time column is not uniformly spaced, instead of loading irregular data with the mean interval as its sampling rate. Times rounded to a printed decimal step are still accepted. CSVの時刻列が等間隔でない場合、平均間隔をサンプリングレートとして読み込まずValueErrorを出すようにしました。小数の桁で丸めて書かれた等間隔の時刻は従来どおり 読み込めます。 noct_spectrum()andnoct_synthesis()failed with a reshape error when a band lay outside MoSQITo's nominal-frequency table (25 Hz to 20 kHz for 1/3 octave, 31.5 Hz to 16 kHz for octave), for examplefmin=20. They now return every band MoSQITo computes.NOctFrame.freqslabels bands in the table with their nominal frequency as before, and bands outside it with their exact center frequency, such as 19.95 Hz.noct_spectrum()とnoct_synthesis()は、MoSQIToの公称周波数の表(1/3オクターブは25 Hz〜 20 kHz、オクターブは31.5 Hz〜16 kHz)の外の帯を含むと(例:fmin=20)reshapeのエラーに なっていました。MoSQIToが計算するすべての帯を返すようにしました。NOctFrame.freqsは、 表にある帯はこれまでどおり公称周波数、表の外の帯は19.95 Hzのような厳密な中心周波数で返します。- Channel selection on a mono
RoughnessFrame(frame[0], a label,get_channel(), iteration andframe[0, :, start:stop]) raisedValueErrorbecause the mono data had no channel axis and the selection indexed the Bark axis. A monoRoughnessFramenow stores its data as(1, 47, n_time), like one channel of a multi-channel frame, so selection works and a mono frame and its selection can be combined arithmetically..dataand.shapeof a mono frame are still(47, n_time), and.dataof a single channel selected from a multi-channel frame is now also(47, n_time)instead of(1, 47, n_time), as for other Frame types. WDF files written from a mono frame store the channel axis; older readers read them as a one-channel frame. モノラルのRoughnessFrameはチャネル軸を持たなかったため、チャネル選択(frame[0]、 ラベル、get_channel()、反復、frame[0, :, start:stop])がBark軸を添字にしてしまいValueErrorになっていました。モノラルも内部では(1, 47, n_time)で保持するようにし、 選択や、選択結果との四則演算ができるようになりました。モノラルの.dataと.shapeは(47, n_time)のままです。複数チャネルから1チャネル選んだ場合の.dataも、他のFrameと 同じく(47, n_time)になります(以前は(1, 47, n_time))。 - The wheel now ships the
py.typedmarker declared by theTyping :: Typedclassifier, so type checkers use wandas's inline annotations.Typing :: Typedの宣言どおり、wheelにpy.typedを含めるようにしました。型チェッカーが wandasの型注釈を使います。 FrameDataset.sample(seed=...)no longer reseeds Python's globalrandomstate, so other code usingrandomis not affected. The same seed still selects the same files.FrameDataset.sample(seed=...)はPythonのグローバルなrandomの状態を再設定しなく なり、randomを使う他のコードに影響しません。同じseedで選ばれるファイルは変わりません。WandasOperationTransformer.set_params()cleared the parameters that were not given whenoperationnamed the operation already configured, so the method defaults applied instead (for exampleorder=8fell back to 4). It now updates only the given parameters; a differentoperationstill replaces them.WandasOperationTransformer.set_params()に設定済みと同じoperationを渡すと、 指定しなかった引数が消えてメソッドの既定値に戻っていました(例:order=8が4に)。 指定した引数だけを更新するようにしました。別のoperationを渡した場合は従来どおり 引数を置き換えます。
See Wandas 0.9.0 for the previous release.