{
  "name": "NumPy ones: computed shape and dtype checks",
  "description": "Reproducible synthetic construction checks compiled from the official NumPy ones, ones_like and array-attribute documentation. The reference for the last row has shape (2, 3) and dtype int16. Each row was computed with NumPy 2.5.4; these are programming examples, not measured research observations.",
  "page": "https://casrai.org/guides/numpy-ones",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-12-01T08:40:00Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Call",
      "unit": "",
      "description": ""
    },
    {
      "name": "Output shape",
      "unit": "",
      "description": ""
    },
    {
      "name": "Dimensions",
      "unit": "",
      "description": ""
    },
    {
      "name": "Elements",
      "unit": "",
      "description": ""
    },
    {
      "name": "Output dtype",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Call": "np.ones(4)",
      "Output shape": "(4,)",
      "Dimensions": 1,
      "Elements": 4,
      "Output dtype": "float64"
    },
    {
      "Call": "np.ones((4, 1))",
      "Output shape": "(4, 1)",
      "Dimensions": 2,
      "Elements": 4,
      "Output dtype": "float64"
    },
    {
      "Call": "np.ones((1, 4))",
      "Output shape": "(1, 4)",
      "Dimensions": 2,
      "Elements": 4,
      "Output dtype": "float64"
    },
    {
      "Call": "np.ones((2, 3), dtype=np.int16)",
      "Output shape": "(2, 3)",
      "Dimensions": 2,
      "Elements": 6,
      "Output dtype": "int16"
    },
    {
      "Call": "np.ones_like(reference, dtype=np.float32)",
      "Output shape": "(2, 3)",
      "Dimensions": 2,
      "Elements": 6,
      "Output dtype": "float32"
    }
  ],
  "sources": [
    {
      "title": "NumPy ones API",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.ones.html",
      "accessed": "2026-11-15"
    },
    {
      "title": "NumPy ones_like API",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.ones_like.html",
      "accessed": "2026-11-15"
    },
    {
      "title": "NumPy array attributes",
      "url": "https://numpy.org/doc/stable/user/absolute_beginners.html#array-attributes",
      "accessed": "2026-11-15"
    }
  ]
}