Skip to content

Instantly share code, notes, and snippets.

View Coldsp33d's full-sized avatar

cs95 Coldsp33d

  • Mountain View, CA
View GitHub Profile
@Coldsp33d
Coldsp33d / pprint.c
Last active July 2, 2016 15:50
Pretty print in NumPy format, any 1D or 2D C matrix (as long as it is stored in 1D form) by specifying dimensions.
#include <stdio.h>
typedef float fpoint_t;
void print(fpoint_t* m, int row_size, int col_size)
{
int i, j;
printf(" array([");