import arcpy
import numpy # Create a simple array from scratch using random values
myArray = numpy.random.random_integers(0,100,2500)
myArray.shape = (50,50) # Convert array to a geodatabase raster
myRaster = arcpy.NumPyArrayToRaster(myArray,x_cell_size=1)
myRaster.save(r"D:\Documents\ArcGIS\Default.gdb\Kr1")
=================================
import arcpy
import numpy
input = u"中国县界_Clip"
arr = arcpy.da.FeatureClassToNumPyArray(input, ('NAME', 'Shape_Area')) print(arr["Shape_Area"].sum())

NumPyArray的更多相关文章

  1. 【转】numpy-array自带的迭代器-----np.nditer

    转自:https://www.jianshu.com/p/f2bd63766204 it = np.nditer(x, flags=['multi_index'], op_flags=['readwr ...

  2. DataFrame转矩阵Np-Array

    DataFrame.as_matrix(columns=None)¶ Convert the frame to its Numpy-array representation.

  3. TensorFlow tutorial

    代码示例来自https://github.com/aymericdamien/TensorFlow-Examples tensorflow先定义运算图,在run的时候才会进行真正的运算. run之前需 ...

  4. 课程五(Sequence Models),第三周(Sequence models & Attention mechanism) —— 1.Programming assignments:Neural Machine Translation with Attention

    Neural Machine Translation Welcome to your first programming assignment for this week! You will buil ...

  5. 课程五(Sequence Models),第二 周(Natural Language Processing & Word Embeddings) —— 1.Programming assignments:Operations on word vectors - Debiasing

    Operations on word vectors Welcome to your first assignment of this week! Because word embeddings ar ...

  6. 机器学习系列-tensorflow-01-急切执行API

    tensorflow急切执行概述 Eager execution is an imperative, define-by-run interface where operations are exec ...

  7. 逐步构建循环神经网络 RNN

    rnn.utils.py import numpy as np def softmax(x): e_x = np.exp(x - np.max(x)) return e_x / e_x.sum(axi ...

  8. 课程五(Sequence Models),第一 周(Recurrent Neural Networks) —— 3.Programming assignments:Jazz improvisation with LSTM

    Improvise a Jazz Solo with an LSTM Network Welcome to your final programming assignment of this week ...

  9. 课程五(Sequence Models),第一 周(Recurrent Neural Networks) —— 1.Programming assignments:Building a recurrent neural network - step by step

    Building your Recurrent Neural Network - Step by Step Welcome to Course 5's first assignment! In thi ...

随机推荐

  1. python 提取目录中特定类型的文件

    python使用‘os’和‘re’模块提取目录中特定类型的文件,这两个模都是安装python自带的,所以不需要安装. 思路: 使用os库lilstdir获取文件夹中的所有文件名,然后带上文件夹路径组合 ...

  2. springboot启动后执行一段代码的方式

    文章转载自: https://www.cnblogs.com/zuidongfeng/p/9926471.html https://blog.csdn.net/zknxx/article/detail ...

  3. D3.js画思维导图(转)

    思维导图的节点具有层级关系和隶属关系,很像枝叶从树干伸展开来的形状.在前面讲解布局的时候,提到有五个布局是由层级布局扩展来的,其中的树状图(tree layout)和集群图(cluster layou ...

  4. IIS-This configuration section cannot be used at this path.

    Q:在IIS上部署web后,游览器打开报以下异常: This configuration section cannot be used at this path. This happens when ...

  5. javascript详解1

    推荐学习链接: https://book.apeland.cn/details/356/ http://es6.ruanyifeng.com/#README https://developer.moz ...

  6. 远程桌面远程代码执行漏洞(CVE-2019-0708)Poc

    此漏洞影响范围: Windows 7 Windows Server 2008 R2 Windows Server 2008 Windows 2003 Windows XP Windows 8和Wind ...

  7. 2019牛客多校第一场 A.Equivalent Prefixes

    题目描述 Two arrays u and v each with m distinct elements are called equivalent if and only if RMQ(u,l,r ...

  8. read_excle

    Signature: pd.read_excel( ['io', 'sheet_name=0', 'header=0', 'skiprows=None', 'skip_footer=0', 'inde ...

  9. oracel: 通过特殊表序列来实现oracle自增id (mybatis实现自增id)

    本项目结合mybaits来使用. 加入有一个用户表:sys_user, 自增id为user_id. 怎么来实现id的自增呢? 通过sql语句select * from user_sequences,检 ...

  10. Codeforces Round #604 (Div. 2) E. Beautiful Mirrors

    链接: https://codeforces.com/contest/1265/problem/E 题意: Creatnx has n mirrors, numbered from 1 to n. E ...