Skip to content

Conversation

Copy link

Copilot AI commented Nov 14, 2025

Adds random_matrix(rows, cols) to pyscan.general for creating matrices with random values in [0, 1].

Changes

  • New function: pyscan.general.random_matrix(rows, cols) wraps numpy.random.rand() with consistent API
  • Module export: Added to pyscan.general.__init__.py
  • Tests: Validates shape, value ranges, and randomness properties

Usage

import pyscan as ps

# Create 1000x2 matrix with random values between 0 and 1
matrix = ps.random_matrix(1000, 2)
Original prompt

python code for creating a 1000-by-2 matrix with random numbers between 0 and 1


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: mplilly4395 <131011896+mplilly4395@users.noreply.github.com>
Copilot AI changed the title [WIP] Add code to create a 1000-by-2 matrix with random numbers Add random_matrix utility for generating random 2D arrays Nov 14, 2025
Copilot AI requested a review from mplilly4395 November 14, 2025 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants