5f4f1f7508
Añade campos params y output al frontmatter YAML de las 506 funciones del registry. Cada parámetro tiene descripción semántica (qué representa, unidades, rango típico) y cada función describe qué produce su output. Permite a agentes razonar sobre cadenas de composición (ej: prices → log_return → sharpe_ratio) sin leer código.
41 lines
988 B
Markdown
41 lines
988 B
Markdown
---
|
|
name: linspace
|
|
kind: function
|
|
lang: py
|
|
domain: datascience
|
|
version: "1.0.0"
|
|
purity: pure
|
|
signature: "def linspace(start: float, stop: float, num: int) -> list"
|
|
description: "Genera una lista de valores equiespaciados entre start y stop (inclusivos)."
|
|
tags: [numeric, range, python]
|
|
uses_functions: []
|
|
uses_types: []
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: ""
|
|
imports: []
|
|
params:
|
|
- name: start
|
|
desc: "valor inicial del rango (ej: 0.0)"
|
|
- name: stop
|
|
desc: "valor final del rango, incluido (ej: 1.0)"
|
|
- name: num
|
|
desc: "numero de puntos a generar (ej: 5). Si num=1, retorna [start]."
|
|
output: "lista de num valores equiespaciados entre start y stop (ambos inclusive)"
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "python/functions/datascience/datascience.py"
|
|
---
|
|
|
|
## Ejemplo
|
|
|
|
```python
|
|
linspace(0, 1, 5)
|
|
# [0.0, 0.25, 0.5, 0.75, 1.0]
|
|
```
|
|
|
|
## Notas
|
|
|
|
Equivalente a numpy.linspace pero sin numpy. Si num=1, retorna [start]. Si num<=0, retorna lista vacia.
|