(this: Bound<'py, Self>)
| 434 | /// View of the attribute data as a numpy array |
| 435 | #[getter] |
| 436 | pub fn data<'py>(this: Bound<'py, Self>) -> PyResult<Bound<'py, PyUntypedArray>> { |
| 437 | use utils::{view_scalar_generic, view_vec_generic}; |
| 438 | match &this.borrow().inner { |
| 439 | PyMeshAttributeData::F32(attr) => match &attr.data { |
| 440 | OwnedAttributeData::ScalarU64(data) => view_scalar_generic(data, this.into_any()), |
| 441 | OwnedAttributeData::ScalarReal(data) => view_scalar_generic(data, this.into_any()), |
| 442 | OwnedAttributeData::Vector3Real(data) => view_vec_generic(data, this.into_any()), |
| 443 | }, |
| 444 | PyMeshAttributeData::F64(attr) => match &attr.data { |
| 445 | OwnedAttributeData::ScalarU64(data) => view_scalar_generic(data, this.into_any()), |
| 446 | OwnedAttributeData::ScalarReal(data) => view_scalar_generic(data, this.into_any()), |
| 447 | OwnedAttributeData::Vector3Real(data) => view_vec_generic(data, this.into_any()), |
| 448 | }, |
| 449 | } |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | /// Mesh with attached point and cell attributes |
nothing calls this directly
no test coverage detected