(self, variable: Variable, name: T_Name = None)
| 597 | return variable |
| 598 | |
| 599 | def decode(self, variable: Variable, name: T_Name = None) -> Variable: |
| 600 | if variable.attrs.get("dtype", False) == "bool": |
| 601 | dims, data, attrs, encoding = unpack_for_decoding(variable) |
| 602 | # overwrite (!) dtype in encoding, and remove from attrs |
| 603 | # needed for correct subsequent encoding |
| 604 | encoding["dtype"] = attrs.pop("dtype") |
| 605 | data = BoolTypeArray(data) |
| 606 | return Variable(dims, data, attrs, encoding, fastpath=True) |
| 607 | else: |
| 608 | return variable |
| 609 | |
| 610 | |
| 611 | class EndianCoder(VariableCoder): |
nothing calls this directly
no test coverage detected