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. Android JSBridge原理与实现

    在Android中,JSBridge已经不是什么新鲜的事物了,各家的实现方式也略有差异.大多数人都知道WebView存在一个漏洞,详细信息见你不知道的 Android WebView 使用漏洞,虽然该 ...

  2. yum [Errno 12] Timeout on

    今天新安装一台CentOS,进行yum安装时出现以下问题提示 perl-5.16.3-294.el7_6.x86_64.r FAILED                                 ...

  3. 高效内存池的设计方案[c语言]

    一.前言概述 本人在转发的博文<内存池的设计和实现>中,详细阐述了系统默认内存分配函数malloc/free的缺点,以及进行内存池设计的原因,在此不再赘述.通过对Nginx内存池以及< ...

  4. springboot学习笔记(二)—— springboot的启动模式设置

    把springboot的启动类图标(spring)去掉,在启动类中添加以下代码 package com.xdr.spring; import org.springframework.boot.Bann ...

  5. tornado项目工程

    项目模块基本架构如下: -------------application.py import tornado.web from views import index, login import con ...

  6. wireshark 抓包再利用TCP socket发送包里的payload是可以实现登陆的

    用户密码可被批量破解 在用户使用手机端登录时,对数据进行抓包分析. 多次抓包分析后,可得到几个关键TCP数据包. 根据前面逆向编写出的解密算法,使用socket进行数据发包测试: 可以模拟APK进行用 ...

  7. 小程序基础能力~自定义 tabBar

    自定义 tabBar 基础库 2.5.0 开始支持,低版本需做兼容处理. 自定义 tabBar 可以让开发者更加灵活地设置 tabBar 样式,以满足更多个性化的场景. 在自定义 tabBar 模式下 ...

  8. SVM: 用kernels(核函数)来定义新的features,避免使用多项式,高斯kernel

    应用kernels来进行非线性分类 非线性分类:是否存在好的features的选择(而不是多项式)--f1,f2,f3.... 上图是一个非线性分类的问题,前面讲过,我们可以应用多项式(feature ...

  9. Linux cut 用法

    cut是一个选取命令,就是将一段数据经过分析,取出我们想要的.一般来说,选取信息通常是针对"行"来进行分析的,并不是整篇信息分析的. )其语法格式为:cut  [-bn] [fil ...

  10. 单片机开发之C语言编程基本规范

    为了提高源程序的质量和可维护性,从而最终提高软件产品生产力,特编写此规范.本标准规定了程序设计人员进行程序设计时必须遵循的规范.本规范主要针对单片机编程语言和08编译器而言,包括排版.注释.命名.变量 ...