summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-01-22 05:34:40 +1100
committerSebastian Berg <sebastian@sipsolutions.net>2020-01-21 10:34:40 -0800
commit287a9d0646c9cc40385615264348a637a7c57205 (patch)
tree15ee6f057044e13284ae4378b0422e23f099a97a /doc
parentc3441dfb3fdde09008b19a2998331d3fc2dd0cd1 (diff)
downloadnumpy-287a9d0646c9cc40385615264348a637a7c57205.tar.gz
NEP: issue deprecation warning when creating ragged array (NEP 34)
This implements NEP 34.
Diffstat (limited to 'doc')
-rw-r--r--doc/release/upcoming_changes/15119.deprecation.rst8
-rw-r--r--doc/release/upcoming_changes/template.rst1
2 files changed, 9 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/15119.deprecation.rst b/doc/release/upcoming_changes/15119.deprecation.rst
new file mode 100644
index 000000000..d18e440fe
--- /dev/null
+++ b/doc/release/upcoming_changes/15119.deprecation.rst
@@ -0,0 +1,8 @@
+
+Deprecate automatic ``dtype=object`` for ragged input
+-----------------------------------------------------
+Calling ``np.array([[1, [1, 2, 3]])`` will issue a ``DeprecationWarning`` as
+per `NEP 34`_. Users should explicitly use ``dtype=object`` to avoid the
+warning.
+
+.. _`NEP 34`: https://numpy.org/neps/nep-0034.html
diff --git a/doc/release/upcoming_changes/template.rst b/doc/release/upcoming_changes/template.rst
index 9c8a3b5fc..997b4850e 100644
--- a/doc/release/upcoming_changes/template.rst
+++ b/doc/release/upcoming_changes/template.rst
@@ -17,6 +17,7 @@
{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %}
{{ text }}
+
{{ get_indent(text) }}({{values|join(', ') }})
{% endfor %}