Private function: return a recarray, an ndarray, a MaskedArray or a MaskedRecords depending on the input parameters
(output, usemask=True, asrecarray=False)
| 325 | |
| 326 | |
| 327 | def _fix_output(output, usemask=True, asrecarray=False): |
| 328 | """ |
| 329 | Private function: return a recarray, an ndarray, a MaskedArray |
| 330 | or a MaskedRecords depending on the input parameters |
| 331 | """ |
| 332 | if not isinstance(output, ma.MaskedArray): |
| 333 | usemask = False |
| 334 | if usemask: |
| 335 | if asrecarray: |
| 336 | output = output.view(mrec.MaskedRecords) |
| 337 | else: |
| 338 | output = ma.filled(output) |
| 339 | if asrecarray: |
| 340 | output = output.view(np.recarray) |
| 341 | return output |
| 342 | |
| 343 | |
| 344 | def _fix_defaults(output, defaults=None): |
no test coverage detected
searching dependent graphs…