Skip to content

Instantly share code, notes, and snippets.

@countrymarmot
countrymarmot / stats.py
Created January 14, 2014 06:27
caculate Cp and Cpk using python numpy
#!/usr/bin/env python
# encoding: utf-8
import numpy as np
def Cp(mylist, usl, lsl):
arr = np.array(mylist)
arr = arr.ravel()
sigma = np.std(arr)