:param orig_type: the original type of used input :param target_type: the type of the result after type promotions
(input, kind, orig_type, target_type)
| 449 | |
| 450 | |
| 451 | def get_numpy_input(input, kind, orig_type, target_type): |
| 452 | """ |
| 453 | :param orig_type: the original type of used input |
| 454 | :param target_type: the type of the result after type promotions |
| 455 | """ |
| 456 | if kind == "const": |
| 457 | return target_type(orig_type(magic_number)) |
| 458 | else: |
| 459 | if "scalar" in kind: |
| 460 | return input.astype(target_type).reshape(input.shape) |
| 461 | else: |
| 462 | return input.astype(target_type) |
| 463 | |
| 464 | |
| 465 | def extract_un_data(pipe_out, sample_id, kind, target_type): |
no test coverage detected