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. BBPlus团队ALPFA冲刺(肖文恒)

    ALPHA冲刺博客 第一天:https://www.cnblogs.com/bbplus/p/11931039.html 第二天:https://www.cnblogs.com/bbplus/p/11 ...

  2. mysql学习之基础篇06

    子查询:又分为where型子查询,from型子查询,exists型子查询这三类. where型子查询:指把内层查询的结果作为外层查询的比较条件: 举个例子: 我们想查出goods_id最大的商品,要求 ...

  3. mysql学习之基础篇02

    我们来说一下表的增删改查的基本语法: 首先建立一个简单的薪资表: create table salary(id int primary key auto_increment,sname varchar ...

  4. 解决 SSH Connection closed by foreign host 问题

    Xshell 报错 : 1.有可能是IP和别人冲突,改一下IP就好了 2.也有可能是文件权限的问题.改一下: cd /etc/ssh/ chmod ssh_host_* chmod *.pub 3.也 ...

  5. MINST样例数据的神经网络学习

    标准的入门学习示例, 比一年前看的那书,更有感觉了. # coding: utf-8 try: import urllib.request except ImportError: raise Impo ...

  6. 使用safe-rm替换rm命令,防止误删除

    1.下载safe源码包: wget https://launchpad.net/safe-rm/trunk/0.12/+download/safe-rm-0.12.tar.gz 2.解压safe-rm ...

  7. 如何从notepad++的偏移量查找

    有的时候报错的会把偏移量直接报错给我们,我就需要根据偏移量定位我们的错误. 比如他报错偏移量1009. 做搜索(按Ctrl + F) 选择Regular expressions并确保有. matche ...

  8. spring-data-jpa一对多多对一多对多关联

    一对多.多对一 Country类 @Entity @Table(name = "Country") public class Country { @Id //sequence id ...

  9. 阿里druid数据源配置及数据库密码加密

    注意: 1.阿里默认只对用户密码解密 2.druid 1.0.16版本及以上的解密时需要同时配置publicKey 一.生成密文密码 1 前提:已经配置了jdk环境 1.生成密文密码需要准备druid ...

  10. 洛谷 P2279 [HNOI2003]消防局的设立 题解

    每日一题 day34 打卡 Analysis 这道题的正解本来是树形dp,但要设5个状态,太麻烦了.于是我就用贪心试图做出此题,没想到还真做出来了. 考虑当前深度最大的叶子结点,你肯定要有一个消防局去 ...