Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
211 views

I'm using metpy.calc.windchill in order to calculate wind chill values, and it automatically spits out an array with a numpy mask on it. t2m, uwind, and vwind all come from ERA5 (on the Google Cloud: ...
0 votes
1 answer
62 views

I have an equation that I try to run in python for a range of values: T = 15 H = range(0, 100) for hum in H: ED = 0.942 * (hum ** 0.679) + 11 * exp((hum - 100) / 10) + 0.18 * (21.1 - T) ** (1 - exp(-...
Elsri's user avatar
  • 61
1 vote
0 answers
91 views

I'm trying to sum some numbers in a masked array using np.add.at as follows: acc = np.ma.zeros((1,), dtype=np.float64) arr = np.ma.masked_array([1.,2.,3.,4.,5.], mask=[0, 1, 0, 0, 0]) np.add.at(acc, [...
-2 votes
1 answer
35 views

I would like to be able to define my axis and not lose information. Currently, I am missing the last data point in both dimensions I defined (see figure). DATA = xr.DataArray(np.random.rand(74,13),...
0 votes
0 answers
43 views

I am trying to build a code that can be given an matrix of nans and not break. I wrote a simplified version here that recreates the problem. I am using numpy version 1.23.5 Basically the code takes a ...
0 votes
0 answers
503 views

I want to create a 1d masked array from a list of one-element (0d) masked arrays using numpy.ma. This works as expected if the values are not masked, it does not in the other case: import numpy.ma as ...
0 votes
1 answer
42 views

I have two 3D masked arrays (netCDF4 files output from climate model) that I want to add together. I followed this thread and got the following (simplified) code out of it: import numpy as np from ...
0 votes
0 answers
187 views

I have a sea surface temperature time series, and I want to calculate the correlation coefficients among the nodes in the tropics(30.0N to 30S). In the time series, the land information is present as ...
3 votes
2 answers
359 views

Calling masked_array (the class constructor) and the masked_where function both seem to do exactly the same thing, in terms of being able to construct a numpy masked array given the data and mask ...
alani's user avatar
  • 13.2k
0 votes
1 answer
124 views

I cannot figure out how to set the fill_value of a real masked array to be np.nan. The array is the result of the calculation of two complex maskedarrays. Somehow, the calculated array's fill_value ...
jbiz's user avatar
  • 45
0 votes
1 answer
503 views

I am new to python and I am trying to convert python 2 code I found on github (https://github.com/RDCEP/psims) into python 3. It went quite well, but now I am stuck with the following error message: ...
1 vote
0 answers
183 views

matplotlib version 3.5.3 Plotting a numpy masked array against a list of datetime objects, plt.plot functions as expected, but plt.scatter still displays the masked data. Auto-axis limits do respect ...
0 votes
1 answer
225 views

I have a function that takes in 4 single value inputs to return a singular float output, for example: from scipy.stats import multivariate_normal grid_step = 0.25 #in units of sigma grid_x, grid_y = ...
0 votes
1 answer
362 views

What is the recommended approach to implement array behaviour/methods on irregular/inhomogeneous data (possesses some inherient dimensionality) within JAX? Two principle options come to mind: make ...
DavidJ's user avatar
  • 440
0 votes
1 answer
495 views

I am trying to implement masked-array fitting using lmfit. Prior I was using curve_fit using the following code snippet. I have omitted the def spec due to its line length. Essentially def spec is ...

15 30 50 per page
1
2 3 4 5
...
11

AltStyle によって変換されたページ (->オリジナル) /