Selected changesmerged Oct 28, 2026
ENH: Add `np.ma.assert_array_equal`Python · 125 + / 1 −
Introduces 3 new declarations in numpy/ma/core.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
numpy/ma/core.py ↗ · 7 files
@@ -8744,6 +8745,129 @@ def allclose(a, b, masked_equal=True, rtol=1e-5, atol=1e-8): return np.all(d) +def assert_array_equal(actual, desired, err_msg='', verbose=True, *,+ strict=False):+ """+ Raises an AssertionError if two masked arrays are not equal.++ Given two array_like objects, check that their masks are equal and that+ their data is equal wherever it is not masked. Unlike+ `numpy.testing.assert_array_equal`, which ignores masked values, a value+ that is masked in only one of the objects is reported as a mismatch.+ Objects that are not masked arrays are treated as having no masked+ values. As in `numpy.testing.assert_array_equal`, NaNs in the same+ unmasked positions are considered equal, and a scalar is compared with+ every element of an array unless `strict` is set.++ .. versionadded:: 2.6.0++ Parameters+ ----------+ actual : array_like+ The actual object to check.+ desired : array_like+ The desired, expected object.+ err_msg : str, optional+ The error message to be printed in case of failure.+ verbose : bool, optional+ If True, the conflicting values are appended to the error message.+ strict : bool, optional+ If True, raise an AssertionError when either the shape or the data+ type of the array_like objects does not match, and disable the+ special handling of scalars.
zlib: skip the stream in sync convenience calls without optionsJavaScript · 162 + / 19 −
Introduces 8 new declarations in lib/zlib.js.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
lib/zlib.js ↗ · 2 files
@@ -176,43 +177,128 @@ function zlibBufferOnEnd() { this.cb(null, buf); } -function zlibBufferSync(engine, buffer) {+function toSyncInput(buffer) { if (typeof buffer === 'string') {- buffer = Buffer.from(buffer);- } else if (!isArrayBufferView(buffer)) {+ return Buffer.from(buffer);+ }+ if (!isArrayBufferView(buffer)) { if (isAnyArrayBuffer(buffer)) {- buffer = Buffer.from(buffer);- } else {- throw new ERR_INVALID_ARG_TYPE(- 'buffer',- ['string', 'Buffer', 'TypedArray', 'DataView', 'ArrayBuffer'],- buffer,- );+ return Buffer.from(buffer); }+ throw new ERR_INVALID_ARG_TYPE(+ 'buffer',+ ['string', 'Buffer', 'TypedArray', 'DataView', 'ArrayBuffer'],+ buffer,+ ); }+ return buffer;+}++function zlibBufferSync(engine, buffer) {+ buffer = toSyncInput(buffer); buffer = processChunkSync(engine, buffer, engine._finishFlushFlag);
parse inline and rustc_force_inline with same parserRust · 136 + / 106 −
Introduces 4 new declarations in compiler/rustc_attr_parsing/src/attributes/inline.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_attr_parsing/src/attributes/inline.rs ↗ · 3 files
@@ -3,125 +3,156 @@ use rustc_feature::AttributeStability; use rustc_lint_defs::builtin::{ILL_FORMED_ATTRIBUTE_INPUT, UNUSED_ATTRIBUTES}; use super::prelude::*;-use crate::diagnostics::{InlineForceInlineConflict, InlineIgnoredForExported};+use crate::diagnostics::{InlineForceInlineConflict, InlineIgnoredForExported, UnusedMultiple}; -pub(crate) struct InlineParser;+#[derive(Default)]+pub(crate) struct InlineParser(Option<(InlineAttr, Span)>); -impl SingleAttributeParser for InlineParser {- const PATH: &[Symbol] = &[sym::inline];- const ON_DUPLICATE: OnDuplicate = OnDuplicate::WarnButFutureError;- const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[- Allow(Target::Fn),- Allow(Target::Method(MethodKind::Inherent)),- Allow(Target::Method(MethodKind::Trait { body: true })),- Allow(Target::Method(MethodKind::TraitImpl)),- Allow(Target::Closure),- Allow(Target::Delegation { mac: false }),- Warn(Target::Method(MethodKind::Trait { body: false })),- Warn(Target::ForeignFn),- Warn(Target::Field),- Warn(Target::MacroDef),- Warn(Target::Arm),- Warn(Target::AssocConst(AssocCtxt::Impl { of_trait: false })),- Warn(Target::AssocConst(AssocCtxt::Trait)),- Warn(Target::AssocConst(AssocCtxt::Impl { of_trait: true })),- Warn(Target::MacroCall),- ]);- const TEMPLATE: AttributeTemplate = template!(- Word,- List: &["always", "never"],
Rewrite TestOptimisticConcurrency to work for both etcd3 and cacher and measure request countGo · 309 + / 12 −
Introduces 10 new declarations in staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
staging/src/k8s.io/apiserver/pkg/storage/testing/store_tests.go ↗ · 5 files
@@ -5992,3 +5992,255 @@ func mustParseResourceVersion(t *testing.T, resourceVersion string) int64 { } return int64(rv) }++type optimisticCallbackAction int++const (+ actionMutate optimisticCallbackAction = iota+ actionNoop+ actionReject+ actionConflictUpdate+ actionConflictDelete+)++type optimisticConcurrencyTestCase struct {+ name string+ missingKey bool+ ignoreNotFound bool+ action optimisticCallbackAction+ preconditions func(current *example.Pod) *storage.Preconditions+ expectStatsCacher KubernetesRequestStats+ expectStatsEtcd KubernetesRequestStats+ expectErr func(error) bool+}++func RunTestOptimisticConcurrency(ctx context.Context, t *testing.T, store storage.Interface, watchCacheEnabled bool, recorder *KubernetesRecorder) {+ matchCurrent := func(cur *example.Pod) *storage.Preconditions {+ return &storage.Preconditions{UID: &cur.UID, ResourceVersion: &cur.ResourceVersion}+ }+ wrongUID := func(_ *example.Pod) *storage.Preconditions {+ return storage.NewUIDPreconditions("wrong-uid")+ }+ wrongRV := func(_ *example.Pod) *storage.Preconditions {
feat(asr): configurable blocks in the Transformer decoderPython · 293 + / 37 −
Introduces 10 new declarations in nemo/collections/asr/modules/transformer/transformer_modules.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
nemo/collections/asr/modules/transformer/transformer_modules.py ↗ · 7 files
@@ -251,6 +329,50 @@ def forward(self, hidden_states): return output_states +class GatedPositionWiseFF(nn.Module):+ """+ Gated position-wise feed-forward network (the GLU variants of Shazeer, 2020), SwiGLU with the defaults.++ The first projection has twice the inner size; its first half goes through ``hidden_act``+ and gates its second half, which goes through ``gate_act``:+ ``dense_out(hidden_act(a) * gate_act(b))`` with ``a, b = dense_in(x).chunk(2)``.+ A decoder block passes its own ``hidden_act`` on to this block, so a block section names ``hidden_act: swish``+ for SwiGLU unless the decoder's activation is already the one wanted.++ Args:+ hidden_size: size of the embeddings in the model, also known as d_model+ inner_size: size of the gated intermediate representation;+ the paper keeps the parameter count of the plain network with two thirds of its inner size+ ffn_dropout: probability of dropout applied to net output+ hidden_act: activation of the first half, a module or its name in the activation registry; default ``swish``+ gate_act: activation of the second half; default ``identity``+ use_bias: bias in both projections; default False, as the gated variants are usually trained+ """++ def __init__(+ self,+ hidden_size,+ inner_size,+ ffn_dropout=0.0,+ hidden_act: nn.Module | str = "swish",+ gate_act: nn.Module | str = "identity",+ use_bias: bool = False,+ ):+ super().__init__()