Skip to content
  • Bago Amirbekian's avatar
    bc66a77b
    [SPARK-20862][MLLIB][PYTHON] Avoid passing float to ndarray.reshape in LogisticRegressionModel · bc66a77b
    Bago Amirbekian authored
    ## What changes were proposed in this pull request?
    
    Fixed TypeError with python3 and numpy 1.12.1. Numpy's `reshape` no longer takes floats as arguments as of 1.12. Also, python3 uses float division for `/`, we should be using `//` to ensure that `_dataWithBiasSize` doesn't get set to a float.
    
    ## How was this patch tested?
    
    Existing tests run using python3 and numpy 1.12.
    
    Author: Bago Amirbekian <bago@databricks.com>
    
    Closes #18081 from MrBago/BF-py3floatbug.
    bc66a77b
    [SPARK-20862][MLLIB][PYTHON] Avoid passing float to ndarray.reshape in LogisticRegressionModel
    Bago Amirbekian authored
    ## What changes were proposed in this pull request?
    
    Fixed TypeError with python3 and numpy 1.12.1. Numpy's `reshape` no longer takes floats as arguments as of 1.12. Also, python3 uses float division for `/`, we should be using `//` to ensure that `_dataWithBiasSize` doesn't get set to a float.
    
    ## How was this patch tested?
    
    Existing tests run using python3 and numpy 1.12.
    
    Author: Bago Amirbekian <bago@databricks.com>
    
    Closes #18081 from MrBago/BF-py3floatbug.
Loading