Registry / data / pydoe
library1.5.0pypypi✓ verified 25d ago

PyDOE is a Python package for design of experiments (DOE), enabling scientists, engineers, and statisticians to efficiently construct experimental designs. It provides extensive support for various DOE methods, including factorial, response-surface, and space-filling designs. The project is actively maintained, with a focus on integrating features from its community forks into the main package.

pip install pydoe
INSTALL
IMPORT
SIG · PYDOE
P
pydoe
datapythonv1.5.0
Install
7.5s avg
Import
2953ms
Disk
231MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 2.402s · 231.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.5s · import 2.322s · 223MB
231MB installed
● package 231MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ff2n
from pydoe import ff2n
For 2-level full-factorial designs.
lhs
from pydoe import lhs
For Latin Hypercube Sampling.
ccdesign
from pydoe import ccdesign
For Central-Composite Designs.

This quickstart demonstrates how to generate a 2-level full-factorial design and Latin Hypercube samples using pydoe. The `ff2n(n)` function creates a 2^n factorial design, and `lhs(n, samples)` generates 'samples' points for 'n' variables using Latin Hypercube Sampling.

import numpy as np from pydoe import ff2n # Create a 2^3 full-factorial design (3 factors, each at 2 levels) design = ff2n(3) print("2^3 Full-Factorial Design Matrix:") print(design) # Example of Latin Hypercube Sampling (LHS) for 2 variables, 5 samples from pydoe import lhs lhs_samples = lhs(2, samples=5) print("\nLatin Hypercube Samples (2 variables, 5 samples):") print(lhs_samples)
Debug
Known issues
breakingOlder versions of `pydoe` (prior to 0.9.x) were not compatible with Python 3 directly, primarily due to changes in the division operator. Attempts to use them with Python 3.x often resulted in `SyntaxError` or `TypeError`. The current version (>=0.9.x) explicitly requires Python >=3.10.
fix
Ensure you are using `pydoe` version 0.9.0 or higher with Python 3.10+ (`pip install pydoe`). If maintaining older Python 3 versions, consider `pyDOE2` or manually patching older `pydoe` versions (though not recommended).
affects: <0.9.0
gotchaHistorically, several forks like `pyDOE2` and `pyDOE3` emerged due to perceived inactivity or unaddressed bugs in the original `pydoe`. While these forks offered updates and new features, the official `pydoe` project is now actively maintained and aims to integrate these improvements.
fix
For new projects, prefer the official `pydoe` package (`pip install pydoe`). Existing users of `pyDOE2`/`pyDOE3` are encouraged to monitor `pydoe`'s development for migration back to the main branch for long-term support.
affects: All
gotchaIn `pydoe` versions before 0.9.x, users might have encountered `DEPRECATION: pyDOE is being installed using the legacy 'setup.py install'` warnings due to the absence of a `pyproject.toml` file.
fix
This issue has been addressed in `pydoe` version 0.9.x and newer, which includes `pyproject.toml` for modern build processes. Upgrade to the latest `pydoe` version to resolve this (`pip install --upgrade pydoe`).
affects: <0.9.0
gotchaSome functions, like `ccdesign`, in older `pydoe` versions were reported to have issues with specific `numpy` versions, leading to `TypeError: can't multiply sequence by non-int of type 'numpy.float64'`.
fix
Ensure both `pydoe` and its dependencies (`numpy`, `scipy`) are updated to their latest compatible versions. If an issue persists, consult the `pydoe` GitHub issues or documentation for known compatibility notes.
affects: <0.9.x
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'imp'
The `imp` module, used by older versions of `pydoe` (or its fork `pyDOE2`), was removed in Python 3.12 and later versions, causing import failures.
fix
Upgrade to a newer version of `pydoe` (0.9.9 or newer) that is compatible with your Python version, or use `pyDOE2` which has addressed this issue. If updating is not an option, manually locate the file (e.g., `doe_factorial.py` within the installed package directory) and replace `import imp` with `import importlib`.
TypeError: can't multiply sequence by non-int of type 'numpy.float64'
This error typically arises from type conversion inconsistencies within older `pydoe` code, especially in functions like `ccdesign`, when interacting with NumPy arrays across different Python or NumPy versions.
fix
Ensure you are using `pydoe` version 0.9.9 or newer, as recent updates aim to improve compatibility. Alternatively, many users resolved this by switching to the `pyDOE2` fork, which specifically addressed such bugs.
ModuleNotFoundError: No module named 'pydoe'
The `pydoe` package is not installed in your current Python environment, there's a typo in the import statement, or your Python environment's path does not include the installation directory.
fix
Install the package using pip: `pip install pydoe`. Double-check the spelling in your import statement (e.g., `from pydoe import fullfact`). If using virtual environments, ensure the correct environment is activated before running your script.
Upgrade
Version history
1.5.0latest on PyPI · released Aug 20, 2026
Audit
Dependencies
numpyrequiredFundamental for numerical operations and array manipulation.
scipyrequiredProvides scientific computing tools, often used in statistical analysis and optimization.
Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources