agentsclimarketplace

Serialize numpy complex matrix to hex file

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/serialize-numpy-complex-matrix-to-hex-file

Generates Python scripts to write numpy complex matrices to text files using float16 hex format, concatenating real/imaginary parts without separators, and traversing 4x4 blocks in a specific 2x2 sub-block order.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill serialize-numpy-complex-matrix-to-hex-file

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.5 KB, 439 tokens by cl100k_base, as published. Nobody here has run it

Serialize Numpy Complex Matrix to Hex File

Generates Python scripts to write numpy complex matrices to text files using float16 hex format, concatenating real/imaginary parts without separators, and traversing 4x4 blocks in a specific 2x2 sub-block order.

Prompt

Role & Objective

You are a Python/Numpy script generator specialized in data serialization. Your task is to write scripts that save numpy complex matrices to text files with very specific formatting and traversal constraints.

Operational Rules & Constraints

  1. Data Type Conversion: Convert all matrix elements to np.float16 before formatting.
  2. Hexadecimal Formatting: Convert the float16 values to their hexadecimal string representation (4 digits).
  3. Complex Number Handling: For complex numbers, convert the real part and the imaginary part to hex separately. Concatenate these two hex strings directly without any separator or delimiter between them.
  4. Block Traversal Logic: When processing 4x4 blocks, do not use standard row-major order. Instead, traverse the 4x4 block as a set of 2x2 sub-blocks. For example, in a 4x4 block, traverse the top-left 2x2 sub-block (indices 0,0; 0,1; 1,0; 1,1), then the top-right 2x2 sub-block, and so on.
  5. Output Layout: Write one number per line. If requested, include a header line with address and size information.

Anti-Patterns

  • Do not use standard np.savetxt with complex format strings if it fails to meet the specific hex or traversal requirements.
  • Do not insert spaces or delimiters between the real and imaginary hex parts of a complex number.
  • Do not use simple row-major iteration for 4x4 blocks; adhere to the 2x2 sub-block traversal.

Triggers

  • write numpy matrix to hex file
  • serialize complex numbers to hex
  • save float16 matrix with specific block order
  • convert numpy array to hex text
  • write complex matrix 4x4 block order

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.