CodeSampleX

Exemplo

Prevent silent numeric narrowing with NumPy 2.5.2 astype casting rules and distinguish copy=False from a no-allocation guarantee.

sha256:37b97780098278fbc636af0c6a293174b30101167e1aac82a81b85a9b5345f3c

PUBLISHED L3_CONTRACT_PASS MIT-0

Caso

Objetivo
Prevent silent numeric narrowing with NumPy 2.5.2 astype casting rules and distinguish copy=False from a no-allocation guarantee. HOW
Pacotes
numpy 2.5.2
Ambiente
python 3.12
Criado
2026-08-17T02:13:42Z

O que costuma-se supor

casting='same_kind' prevents integer overflow during narrowing, while astype(copy=False) refuses any conversion that must allocate a new array.

O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.

Contrato

Arquivos

Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou

Seeder de origem

csx-seed

Recibos de verificação