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. 从汇编语言写到c语言

    好了,言归正传,裸机程序没有操作系统的支持,想要用c语言,就只能先使用汇编语言手动配置c语言需要的环境,听起来很高大上,其实需要做的很简单:指定堆栈指针的值就好. 那么完成这个简单的事情之前,先要明白 ...

  2. linux驱动开发手记【2】

    1./dev目录下,主设备号和次设备号.ls -l可以通过第一个字母是c或者b区分是字符设备或者是块设备.主设备号标识设备对应的驱动程序. 2.分配设备编号: 如果我们提前明确知道所需要的设备编号,则 ...

  3. 用python实现数据库查询数据方法

    哈喽,好久没来了,最近搞自动化发现了很多代码弯路,特别分享出来给能用到的朋友 因为公司业务的关系,每做一笔功能冒烟测试,我们就要对很多的数据库表中的字段进行校验,当时我就想反正总是要重复的运行这些SQ ...

  4. django后台xadmin如下配置(小结)

    django-admin文档:https://xadmin.readthedocs.io/en/latest/index.html目录: 1.xadmin基本配置 2.配置后台显示的模型类 3.后台注 ...

  5. [堆栈]Linux 中的各种栈:进程栈 线程栈 内核栈 中断栈

    转自:https://blog.csdn.net/yangkuanqaz85988/article/details/52403726 问题1:不同线程/进程拥有着不同的栈,那系统所有的中断用的是同一个 ...

  6. netty websocket

    1 全局保存websocket的通道  NettyConfig.java public class NettyConfig { public static ChannelGroup group = n ...

  7. 微信小程序API---数据缓存

    本地数据缓存常用于存储多页面用到的数据,例如用户头像信息. (1)数据存储 wx.setStorage(Object object)与wx.setStorageSync(string key, any ...

  8. 《你又怎么了我错了行了吧》【Beta】Scrum meeting 3

    第三天 日期:2019/6/26 前言: 第3次会议在女生宿舍召开(前一天晚上开的) 项目全部基本测试完成,解决了多处bug,明天终于可以拿去演示了.... 1.1 今日完成任务情况.成员贡献时间及工 ...

  9. Python语言程序设计(2)--深入理解python

  10. react 学习记录

    1.  脚手架搭建项目  create-react-app https://www.jianshu.com/p/d196761c8332 2. UI框架 https://ant.design/docs ...