Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: How to fill between the same area with two different colors
Post: How to fill between the same area with two differe...

import matplotlib.pyplot as plt x1 = [1,2,3,4,5,] y1 = [2,3,4,5,6] y2 = [6,7,8,9,10] x2 = [6,7,8,9,10] y11 = [2,3,4,5,6] y22 = [10,11,12,12,5] instead of plottig them separately like this plt.fill_...
Staph General Coding Help 0 1,461 Jul-08-2020, 07:01 PM
    Thread: word subscript
Post: word subscript

Please how to i write Asubscriptmean as a string in pytho A[mean] where the word mean is subscript?
Staph General Coding Help 1 1,744 Mar-31-2020, 08:40 AM
    Thread: Apply rolling window function over time dimension of 3D data
Post: Apply rolling window function over time dimension ...

import xarray as xr import numpy as np def get_grps(s, thresh=-1, Nmin=2): """ Nmin : int > 0 Min number of consecutive values below threshold. """ s = pd.Series(s) m = ...
Staph Data Science 0 2,160 Jan-01-2020, 08:31 AM
    Thread: modify code to accept 3d array
Post: modify code to accept 3d array

import xarray as xr import numpy as np def get_grps(s, thresh=-1, Nmin=2): """ Nmin : int > 0 Min number of consecutive values below threshold. """ s = pd.Series(s) m = ...
Staph Data Science 0 1,437 Jan-01-2020, 08:24 AM
    Thread: finding probability of exceding certain threshold
Post: finding probability of exceding certain threshold

Given a numpy array of length say 300 contain different values from 0-5 How can I find the probability of exceeding certain threshold like 4 in python? Thanks. Mustapha.
Staph General Coding Help 1 1,864 Dec-14-2019, 02:40 AM
    Thread: how to calculate overlaping coefficient between two probablity functions
Post: overlapping coefficient between two distributions?

How can I find the overlap between the following distributions? from import scipy.stats np.random.seed(seed=233423) R1 = scipy.stats.skewnorm(2, 0, 2).rvs(1000) R2 = scipy.stats.skewnorm(3, 1, 2).r...
Staph Data Science 3 3,675 Aug-11-2019, 08:10 AM
    Thread: finding the integral of probability density function
Post: RE: finding the integral of probability density fu...

Thanks, so I have two of such pdfs generated on range of x and I am trying to calculate area overlap between the two. any help in that regards?
Staph Data Science 3 3,594 Aug-11-2019, 07:37 AM
    Thread: finding the integral of probability density function
Post: finding the integral of probability density functi...

Given a probability density function (pdf) like this pdf = skew_norm_pdf(x,location,scale,SKEW_PARAMS[0]) how can I find the integral for this pdf in python?
Staph Data Science 3 3,594 Aug-11-2019, 04:31 AM
    Thread: how to calculate overlaping coefficient between two probablity functions
Post: RE: how to calculate overlaping coefficient betwee...

Hi can you please explain this further, will be nice if you could add some simple scrip to do this? Moreover how do I know pdf1(x) < pdf2(x)?
Staph Data Science 3 3,675 Aug-11-2019, 12:49 AM
    Thread: how to calculate overlaping coefficient between two probablity functions
Post: how to calculate overlaping coefficient between tw...

I have two probability density functions generated as follows: location = 0.97 scale = 1.0 x = np.linspace(-5,5,100) plt.subplots(figsize=(12,4)) pdf1 = skew_norm_p...
Staph Data Science 3 3,675 Aug-10-2019, 05:02 AM
    Thread: creating new time series based on giving mean, standard deviation and skewness
Post: creating new time series based on giving mean, sta...

I have a time series like ts = [1,50,10,...,600] I calculate the mean as mean = 10 standard deviation = 100 skew = 5 I want to increase these parameters and then use it to generate new time se...
Staph Data Science 1 3,085 Aug-06-2019, 12:29 PM
    Thread: hatching not working properly with matplotlib
Post: RE: hatching not working properly with matplotlib

I turned it off but same problem
Staph General Coding Help 3 2,947 Jul-28-2019, 07:00 AM
    Thread: hatching not working properly with matplotlib
Post: hatching not working properly with matplotlib

I have 2 arrays arr1 contains correlation values of between -1 to 1 arr2 contains nans and 1's but same shape as arr1 arr1 = 180 * 360 arr2 = 180 * 360 I want to plot arr2 on arr1 as a hatch like th...
Staph General Coding Help 3 2,947 Jul-28-2019, 05:24 AM
    Thread: Multiprocessing using on multiple for loops
Post: RE: Multiprocessing using on multiple for loops

Yes sorry it didnt get typed. I wanted to ask how I can use multiprocessing to speed up this code in python?
Staph General Coding Help 3 2,521 Jul-28-2019, 04:59 AM
    Thread: Multiprocessing using on multiple for loops
Post: Multiprocessing using on multiple for loops

AS5_all = [] n= 500 for i in range n: for x in range(len(lat)): for y in range(len(lon)): lst = np.array((AS[:, x, y])) rs = resample(lst) rs_all[:, x,...
Staph General Coding Help 3 2,521 Jul-27-2019, 08:54 AM
    Thread: create 10 yearly blocks from time series using pandas
Post: create 10 yearly blocks from time series using pan...

So I have time series of ts = 1, 2,3,4, ........,320 I want to arrange in in dataframe as follows: row1 1,2,3............., 120 row2, 12,13, 14,........ 122 row3, 24,25,26, ........ 134 etc, Any he...
Staph Data Science 1 1,929 Jul-23-2019, 05:18 AM
    Thread: retrieving pvalue from statsmodels results
Post: RE: retrieving pvalue from statsmodels results

I tried but doesnt work
Staph General Coding Help 4 2,977 Jul-18-2019, 02:16 PM
    Thread: retrieving pvalue from statsmodels results
Post: retrieving pvalue from statsmodels results

Please how can I retrieve on p-values from this results = results.test_causality('Q50', ['Q95'], kind='f') print results# output: Output:<statsmodels.tsa.vector_ar.hypothesis_test_results.Causali...
Staph General Coding Help 4 2,977 Jul-18-2019, 01:59 PM
    Thread: select data based on indice
Post: RE: select data based on indice

Hi , this copies both the month the values together, is there a way to get only the only values? in the same order as the months?
Staph Data Science 4 2,450 Jul-14-2019, 01:33 PM
    Thread: select data based on indice
Post: RE: select data based on indice

Thanks works like a charm
Staph Data Science 4 2,450 Jul-14-2019, 11:03 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020