Coder Social home page Coder Social logo

fmeca's Introduction

FMECA

import numpy as np FMECA_dict = {'capacitor':[3,['open','change in value','short'],['45%','35%','20%']], 'diode':[4,['open','short','drift','change in_value'],['10%','20%','15%','15%']], 'transistor':[5,['open','short','drift','change in value','kkllll'],['5%','10%','20%','30%','35%']]}

output = [ [ 0 for i in range(45) ] for j in range(35) ] #output = np.zeros(shape=(50,50)) current_row = 0 data = np.genfromtxt('C:\Users\KIRAN\Desktop\New.csv',delimiter=',',dtype = str) rows = data.shape[0] columns = data.shape[1] print(data) for i in range(rows): for j in range(FMECA_dict[data[i][1].lower()][0]): output[current_row][0] = str(i+1)+'-'+str(int(j+1)) output[current_row][1] = data[i][0] output[current_row][2] = (data[i][1]).capitalize() output[current_row][3] = FMECA_dict[data[i][1].lower()][1][j] output[current_row][3] = FMECA_dict[data[i][1].lower()][2][j] current_row +=1 print(output)

fmeca's People

Contributors

jchandrakiran avatar

Watchers

kevinwang2008 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.