TypeError:根据规则“安全”,无法将数组数据从dtype'float64'转换为dtype'<U32'

问题描述

我正在尝试运行此代码进行分析。

import numpy as np

import pandas as pd

import xarray as xr

import matplotlib.pyplot as plt

GPCC=xr.open_dataset("sellonlat_bil_remap_GPCC_precip_2000_2015.nc")
ccsm_clm=xr.open_dataset("sellonlat_bil_remap_addc_monmean_daymean_2m_tempe_warm_new_2000-2015.nc")

tempe=GPCC['precip'].sel(time=slice('2000-01-16','2015-12 16')).groupby('time.month').mean('time',skipna=False).mean('lon').mean('lat')

tempe1=ccsm_clm['APRC'].sel(time=slice('2000-01-16',skipna=False).mean('lon').mean('lat')

对于GPCC数据来说效果很好,但是ccsm_clm数据显示以下错误

TypeError:无法根据规则“安全”将数组数据从dtype('float64')转换为dtype('

我正在寻找建议。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)