We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I meet a erro like this when i use OrdinaryKriging() zero-size array to reduction operation maximum which has no identity
zero-size array to reduction operation maximum which has no identity
My code looks like this:
Data = geopandas.read_file('./housepricepoi.shp').to_crs('EPSG:4547') lons = Data['geometry'].x.values lons = np.nan_to_num(lons) lats = Data['geometry'].y.values lats = np.nan_to_num(lats) price = Data['price'].values price = np.nan_to_num(price) try: ok3d = OrdinaryKriging(lons, lats, price, variogram_model='linear') k3d1, ss3d = ok3d.execute("grid", grid_lon, grid_lat) except Exception as e: print(e)
The info of data is like:
<class 'geopandas.geodataframe.GeoDataFrame'> RangeIndex: 9920 entries, 0 to 9919 Data columns (total 2 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 price 9920 non-null int64 1 geometry 9920 non-null geometry dtypes: geometry(1), int64(1) memory usage: 155.1 KB
I wonder if it's my data that's causing the problem if you want the data,i will send it to your email.
The text was updated successfully, but these errors were encountered:
And this is my new code:
Data = geopandas.read_file('./housepricepoi.shp').to_crs('EPSG:4547') Data = Data.drop_duplicates(['geometry']) ok3d = OrdinaryKriging(Data['geometry'].x, Data['geometry'].y, Data['price']) k3d1, ss3d = ok3d.execute("grid", grid_lon, grid_lat)
this is the info of Data:
Data
<class 'geopandas.geodataframe.GeoDataFrame'> Int64Index: 1585 entries, 0 to 9877 Data columns (total 2 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 price 1585 non-null int64 1 geometry 1585 non-null geometry dtypes: geometry(1), int64(1) memory usage: 37.1 KB
it's still raise the erro: ValueError: zero-size array to reduction operation maximum which has no identity
ValueError: zero-size array to reduction operation maximum which has no identity
Sorry, something went wrong.
No branches or pull requests
I meet a erro like this when i use OrdinaryKriging()
zero-size array to reduction operation maximum which has no identity
My code looks like this:
The info of data is like:
I wonder if it's my data that's causing the problem
if you want the data,i will send it to your email.
The text was updated successfully, but these errors were encountered: