Instead of trying for a one-liner with magic squeeze behavior, only squeeze if predicting for a single lambda value, and then only squeeze off the last axis (the lambda path). This way we'll get the correct return shape for all input shapes, including single rows.
PR #51 fixed 1-row predictions for the case of single-lambda predictions with LogitNet, but didn't properly handle multi-lambda predictions, and didn't fix 1-row predictions for ElasticNet.
Instead of trying for a one-liner with magic
squeeze
behavior, only squeeze if predicting for a single lambda value, and then only squeeze off the last axis (the lambda path). This way we'll get the correct return shape for all input shapes, including single rows.PR #51 fixed 1-row predictions for the case of single-lambda predictions with
LogitNet
, but didn't properly handle multi-lambda predictions, and didn't fix 1-row predictions forElasticNet
.Closes #52 , #30 , #25 .