| 377 | 377 | "Numpy numeric type.") |
| 378 | 378 | |
| 379 | 379 | # by default, cast any integer, boolean, etc., to float |
| 380 | # but preserve existing floating-point types, especially float16 | |
| 380 | 381 | if dtype is None and (not (np.can_cast(np.float32, value.dtype) |
| 381 | 382 | or value.dtype.fields) |
| 382 | 383 | or value.dtype.kind == 'O'): |
| 383 | value = value.astype(float) | |
| 384 | # Don't convert if dtype is already a floating-point type | |
| 385 | if value.dtype.kind not in 'f': | |
| 386 | value = value.astype(float) | |
| 384 | 387 | |
| 385 | 388 | value = value.view(cls) |
| 386 | 389 | value._set_unit(value_unit) |
| Test Name | Status |
|---|---|
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_preserve_dtype | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_1 | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_2 | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_3 | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_nan_inf | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_unit_property | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_copy | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_subok | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_order | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_ndmin | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_non_quantity_with_unit | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_creation_via_view | Fail |
astropy/units/tests/test_quantity.py::TestQuantityCreation::test_rshift_warns | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_addition | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_subtraction | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_multiplication | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_division | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_commutativity | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_power | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_matrix_multiplication | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_unary | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_abs | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_incompatible_units | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_non_number_type | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_dimensionless_operations | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_complicated_operation | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_comparison | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_numeric_converters | Fail |
astropy/units/tests/test_quantity.py::TestQuantityOperations::test_array_converters | Fail |
astropy/units/tests/test_quantity.py::test_quantity_conversion | Fail |
astropy/units/tests/test_quantity.py::test_quantity_value_views | Fail |
astropy/units/tests/test_quantity.py::test_quantity_conversion_with_equiv | Fail |
astropy/units/tests/test_quantity.py::test_quantity_conversion_equivalency_passed_on | Fail |
astropy/units/tests/test_quantity.py::test_self_equivalency | Fail |
astropy/units/tests/test_quantity.py::test_si | Fail |
astropy/units/tests/test_quantity.py::test_cgs | Fail |
astropy/units/tests/test_quantity.py::TestQuantityComparison::test_quantity_equality | Fail |
astropy/units/tests/test_quantity.py::TestQuantityComparison::test_quantity_equality_array | Fail |
astropy/units/tests/test_quantity.py::TestQuantityComparison::test_quantity_comparison | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_dimensionless_quantity_repr | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_dimensionless_quantity_str | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_dimensionless_quantity_format | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_scalar_quantity_str | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_scalar_quantity_repr | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_array_quantity_str | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_array_quantity_repr | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_scalar_quantity_format | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_uninitialized_unit_format | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_to_string | Fail |
astropy/units/tests/test_quantity.py::TestQuantityDisplay::test_repr_latex | Fail |
astropy/units/tests/test_quantity.py::test_decompose | Fail |
astropy/units/tests/test_quantity.py::test_decompose_regression | Fail |
astropy/units/tests/test_quantity.py::test_arrays | Fail |
astropy/units/tests/test_quantity.py::test_array_indexing_slicing | Fail |
astropy/units/tests/test_quantity.py::test_array_setslice | Fail |
astropy/units/tests/test_quantity.py::test_inverse_quantity | Fail |
astropy/units/tests/test_quantity.py::test_quantity_mutability | Fail |
astropy/units/tests/test_quantity.py::test_quantity_initialized_with_quantity | Fail |
astropy/units/tests/test_quantity.py::test_quantity_string_unit | Fail |
astropy/units/tests/test_quantity.py::test_quantity_invalid_unit_string | Fail |
astropy/units/tests/test_quantity.py::test_implicit_conversion | Fail |
astropy/units/tests/test_quantity.py::test_implicit_conversion_autocomplete | Fail |
astropy/units/tests/test_quantity.py::test_quantity_iterability | Fail |
astropy/units/tests/test_quantity.py::test_copy | Fail |
astropy/units/tests/test_quantity.py::test_deepcopy | Fail |
astropy/units/tests/test_quantity.py::test_equality_numpy_scalar | Fail |
astropy/units/tests/test_quantity.py::test_quantity_pickelability | Fail |
astropy/units/tests/test_quantity.py::test_quantity_initialisation_from_string | Fail |
astropy/units/tests/test_quantity.py::test_unsupported | Fail |
astropy/units/tests/test_quantity.py::test_unit_identity | Fail |
astropy/units/tests/test_quantity.py::test_quantity_to_view | Fail |
astropy/units/tests/test_quantity.py::test_quantity_tuple_power | Fail |
astropy/units/tests/test_quantity.py::test_quantity_fraction_power | Fail |
astropy/units/tests/test_quantity.py::test_inherit_docstrings | Fail |
astropy/units/tests/test_quantity.py::test_repr_array_of_quantity | Fail |
astropy/units/tests/test_quantity.py::TestQuantityMatplotlib::test_plot | Fail |
astropy/units/tests/test_quantity.py::test_unit_class_override | Fail |
astropy/units/tests/test_quantity.py::TestQuantityMimics::test_mimic_input[QuantityMimic] | Fail |
astropy/units/tests/test_quantity.py::TestQuantityMimics::test_mimic_input[QuantityMimic2] | Fail |
astropy/units/tests/test_quantity.py::TestQuantityMimics::test_mimic_setting[QuantityMimic] | Fail |
astropy/units/tests/test_quantity.py::TestQuantityMimics::test_mimic_setting[QuantityMimic2] | Fail |
Loading...
Ridges.AI© 2025 Ridges AI. Building the future of decentralized AI development.
