Skip to main content

All Questions

Tagged with
1 vote
0 answers
387 views

ArcGIS showing error name 'np' is not defined

I have already installed the arcgis library in Python. Used install command:- pip install arcgis However, when I am trying to import the following from arcgis I am facing the following issues:- from ...
Daremitsu's user avatar
  • 643
1 vote
2 answers
2k views

Write strings and float number to an ASCII file with python

I've been trying to concatenate two arrays (string array and float array) and then write the final array to a CSV file. However, I've been facing a lot of problems to solve it. I already tried a lot ...
Elias's user avatar
  • 21
0 votes
0 answers
620 views

ArcGIS 10.4.1 ImportError: cannot import name multiarray with numpy

I've installed ArcGIS 10.4.1, and with it the numpy 1.9.2 library. However, I get the following error when I try to run any scripts with numpy: >>> import numpy Runtime error Traceback (...
GrantRWHumphries's user avatar
0 votes
0 answers
1k views

How do I make a list(array) of functions from np.poly1d in numpy?

I'm running through some tiffs that represent the amount of water being evaporated. My code below loops through the images and makes a polynomial function for each pixel.However, after poly_fn is ...
fotxoa's user avatar
  • 5
3 votes
1 answer
793 views

Installing python packages without dependencies

I am trying to install a specific version of a python package into a pre-installed python environment. The package is laspy and the version is an old one (1.2.5). The package is supposed to work with ...
umbe1987's user avatar
  • 3,640
2 votes
0 answers
1k views

Numpy rolling window calculation

I am really new to python and numpy so please bear with me. I am trying to create a cellular automata for hydrological purposes, more specifically flood modelling.I have 2 rasters, a DEM and a raster ...
Cristian Iosub's user avatar
3 votes
1 answer
2k views

Creating a raster image from a NumPy array

I am scripting using arcpy, and I have a NumPy matrix with dimensions crops by counties. This matrix is populated with floats. I also have an individual raster image showing crops as well as a ...
Coder McGee's user avatar
2 votes
1 answer
596 views

TypeError: unsupported operand type(s) for +: 'numpy.ndarray' and 'str'

I'm programming in python with OpenCv libraries. I'm trying to delete shades using opencv, so after that I want to calculate NDVI (Arcpy libraries). So if I calculate NDVI from the original image, it ...
Yehadska's user avatar
0 votes
1 answer
2k views

ArcGIS/Python: How to sum rows based on a common ID

So, I would like a way to sum values in a table based on a common identifier (in the table below, the field 'IWUP'). My table looks something like this: +--------------------+--------------------+-...
Cfree's user avatar
  • 57
2 votes
2 answers
151 views

How to search in one NumPy array for positions for getting at these position the value from a second NumPy array?

I have two raster files which I have converted into NumPy arrays (arcpy.RasterToNumpyArray) to work with the values in the raster cells with Python. One of the raster has two values True and False. ...
Sven's user avatar
  • 205
4 votes
2 answers
3k views

error importing stats from scipy- new computer with new ArcGIS 10.1 install

I have a new machine with a fresh install of Arc10.1. When ArcGIS installs it also installs python 2.7 with numpy. My script can import scipy (import scipy), but when I try from scipy import stats ...
therMapper's user avatar
1 vote
1 answer
454 views

Python help('modules') command throws WindowsError in IDLE (idle.pyw) but not command line prompt (python.exe)

If I type the following at the python.exe command prompt... >>>help('modules') ...I get a list of available modules as expected. However when I type the same thing in the IDLE environment (...
user2282659's user avatar
3 votes
1 answer
1k views

how to manipulate numpy arrays for use with ESRI's arcpy.da.NumPyArrayToTable

ESRI gives access to moving data from tables to arrays and back. I have a script that takes census data from an api call and converts it into arrays, does some simple math, and then, ideally, puts it ...
David Richey's user avatar
2 votes
2 answers
697 views

Using Numpy to generate ASCII kernel

I am using ArcGIS focal statistics tool to add spatial autocorrelation to a random raster to model error in DEMs. The input DEM has a 1.5m pixel size and the semivariogram exhibits a sill around ...
Jzl5325's user avatar
  • 3,974